From 206532e6e2e4710e238b9dc66546bc886d1b583a Mon Sep 17 00:00:00 2001 From: "wu@webrtc.org" Date: Wed, 7 Nov 2012 23:37:41 +0000 Subject: [PATCH] Fix a bug in spatial_resampler where we should set the timestamp after Scale. TEST=try bots BUG=1069 Review URL: https://webrtc-codereview.appspot.com/936018 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3061 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../video_processing/main/source/spatial_resampler.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webrtc/modules/video_processing/main/source/spatial_resampler.cc b/webrtc/modules/video_processing/main/source/spatial_resampler.cc index dc1ff44dba..5f1359fa69 100644 --- a/webrtc/modules/video_processing/main/source/spatial_resampler.cc +++ b/webrtc/modules/video_processing/main/source/spatial_resampler.cc @@ -82,12 +82,13 @@ VPMSimpleSpatialResampler::ResampleFrame(const I420VideoFrame& inFrame, if (retVal < 0) return retVal; - // Setting time parameters to the output frame - all the rest will be - // set by the scaler. + retVal = _scaler.Scale(inFrame, outFrame); + + // Setting time parameters to the output frame. + // Timestamp will be reset in Scale call above, so we should set it after. outFrame->set_timestamp(inFrame.timestamp()); outFrame->set_render_time_ms(inFrame.render_time_ms()); - retVal = _scaler.Scale(inFrame, outFrame); if (retVal == 0) return VPM_OK; else