Bug 1269408: P5. Only drop the seek target if it's exactly the seek target. r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 05 May 2016 15:09:42 +1000
changeset 296339 c8f8ca0ce3da9a1becd67298081b41fb119a61eb
parent 296338 dbfe3461453cb28206088b92f275f7c5c44f1752
child 296340 5b482784bf7a23390d9e32421786cdbc2f1998d2
push id76303
push userjyavenard@mozilla.com
push dateFri, 06 May 2016 07:32:02 +0000
treeherdermozilla-inbound@7d9879db28af [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1269408
milestone49.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
Bug 1269408: P5. Only drop the seek target if it's exactly the seek target. r=gerald If the Skip To Next Keyframe logic was activated, the next frame demuxed would have been passed the internal seek target, causing it to be unnecessarily dropped. MozReview-Commit-ID: DExwMPLXlZu
dom/media/MediaFormatReader.cpp
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -1111,17 +1111,17 @@ MediaFormatReader::Update(TrackType aTra
   while (decoder.mTimeThreshold && decoder.mOutput.Length()) {
     RefPtr<MediaData>& output = decoder.mOutput[0];
     InternalSeekTarget target = decoder.mTimeThreshold.ref();
     media::TimeUnit time = media::TimeUnit::FromMicroseconds(output->mTime);
     if (time >= target.mTime) {
       // We have reached our internal seek target.
       decoder.mTimeThreshold.reset();
     }
-    if (time < target.mTime || target.mDropTarget) {
+    if (time < target.mTime || (target.mDropTarget && time == target.mTime)) {
       LOGV("Internal Seeking: Dropping %s frame time:%f wanted:%f (kf:%d)",
            TrackTypeToStr(aTrack),
            media::TimeUnit::FromMicroseconds(output->mTime).ToSeconds(),
            target.mTime.ToSeconds(),
            output->mKeyframe);
       decoder.mOutput.RemoveElementAt(0);
     }
   }