Bug 1053051 - Ensure timestamps are up to date when seeking. r=jwwang, a=bajaj
authorBlake Wu <bwu@mozilla.com>
Mon, 06 Oct 2014 10:09:40 +0800
changeset 204061 390acb9d220dfffd87c64d9e2e8051df82a28c3a
parent 204060 4c0eb73dfac7d7aa96dbfee257701bd6ce4417f2
child 204062 a2d707e79061f58f6af42f1dab9cfe84cfcfe474
child 204601 3b5ffad3e3b3b490f6e02b7b57a10702fabc8b82
push id395
push userryanvm@gmail.com
push dateTue, 07 Oct 2014 13:50:45 +0000
treeherdermozilla-b2g32_v2_0@390acb9d220d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwwang, bajaj
bugs1053051
milestone32.0
Bug 1053051 - Ensure timestamps are up to date when seeking. r=jwwang, a=bajaj
content/media/MediaDecoderStateMachine.cpp
--- a/content/media/MediaDecoderStateMachine.cpp
+++ b/content/media/MediaDecoderStateMachine.cpp
@@ -2023,22 +2023,20 @@ void MediaDecoderStateMachine::DecodeSee
     mIsAudioDecoding = false;
     mIsVideoDecoding = false;
     DispatchDecodeTasksIfNeeded();
   } else {
     DECODER_LOG(PR_LOG_DEBUG, "Changed state from SEEKING (to %lld) to DECODING", seekTime);
     stopEvent = NS_NewRunnableMethod(mDecoder, &MediaDecoder::SeekingStopped);
     StartDecoding();
   }
-
-  if (newCurrentTime != mediaTime) {
-    UpdatePlaybackPositionInternal(newCurrentTime);
-    if (mDecoder->GetDecodedStream()) {
-      SetSyncPointForMediaStream();
-    }
+  // Ensure timestamps are up to date
+  UpdatePlaybackPositionInternal(newCurrentTime);
+  if (mDecoder->GetDecodedStream()) {
+    SetSyncPointForMediaStream();
   }
 
   // Try to decode another frame to detect if we're at the end...
   DECODER_LOG(PR_LOG_DEBUG, "Seek completed, mCurrentFrameTime=%lld", mCurrentFrameTime);
 
   {
     ReentrantMonitorAutoExit exitMon(mDecoder->GetReentrantMonitor());
     NS_DispatchToMainThread(stopEvent, NS_DISPATCH_SYNC);