Revert "Bug 1112438 - Make newCurrentFrameTime more accurate while seeking by checking audio & video timestamp boundary in addition. r=cpearce" r=cpearce
☠☠ backed out by 11b9708fcd9a ☠ ☠
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 28 Jan 2016 15:48:06 +1100
changeset 282485 3c471a71317ea3ddef7a529e38e94daa087ffd10
parent 282484 4d0e60e0a2b3bdb7ec5f66d4733cc0df898273da
child 282486 16cb550a680d0cb6d571e430308805fe68f6bd3a
push id71184
push userjyavenard@mozilla.com
push dateMon, 01 Feb 2016 06:52:54 +0000
treeherdermozilla-inbound@16cb550a680d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, cpearce
bugs1112438
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Revert "Bug 1112438 - Make newCurrentFrameTime more accurate while seeking by checking audio & video timestamp boundary in addition. r=cpearce" r=cpearce This reverts commit 4b812ca9 The original commit was a work around for poorly encoded videos generated by some FFOS devices which could make the first audio frame non-zero. Trying then to make them appear as zero when seeking to start. There are better ways to get around this problem.
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2084,25 +2084,17 @@ MediaDecoderStateMachine::SeekCompleted(
   int64_t newCurrentTime = seekTime;
 
   // Setup timestamp state.
   RefPtr<MediaData> video = VideoQueue().PeekFront();
   if (seekTime == Duration().ToMicroseconds()) {
     newCurrentTime = seekTime;
   } else if (HasAudio()) {
     MediaData* audio = AudioQueue().PeekFront();
-    // Though we adjust the newCurrentTime in audio-based, and supplemented
-    // by video. For better UX, should NOT bind the slide position to
-    // the first audio data timestamp directly.
-    // While seeking to a position where there's only either audio or video, or
-    // seeking to a position lies before audio or video, we need to check if
-    // seekTime is bounded in suitable duration. See Bug 1112438.
-    int64_t videoStart = video ? video->mTime : seekTime;
-    int64_t audioStart = audio ? audio->mTime : seekTime;
-    newCurrentTime = std::min(audioStart, videoStart);
+    newCurrentTime = audio ? audio->mTime : seekTime;
   } else {
     newCurrentTime = video ? video->mTime : seekTime;
   }
 
   // Change state to DECODING or COMPLETED now. SeekingStopped will
   // call MediaDecoderStateMachine::Seek to reset our state to SEEKING
   // if we need to seek again.