Bug 1270323: P2. Don't process new incoming data while a skip to next keyframe is pending. r=cpearce
authorJean-Yves Avenard <jyavenard@mozilla.com>
Sat, 21 May 2016 23:02:43 +0800
changeset 298552 adc18bf4eac239df675ef89663290e7fb9e8efa8
parent 298551 f17f688f419c774d967be6338a32bf95a05848b5
child 298553 f4b4c6f24fc38e4335219e415e918724c9a4ea9a
push id77229
push userjyavenard@mozilla.com
push dateTue, 24 May 2016 03:57:19 +0000
treeherdermozilla-inbound@5613020111ba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1270323, 1272964
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 1270323: P2. Don't process new incoming data while a skip to next keyframe is pending. r=cpearce Followup from bug 1272964 P4. MozReview-Commit-ID: 18MC3O1JZLv
dom/media/MediaFormatReader.cpp
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -796,16 +796,22 @@ MediaFormatReader::UpdateReceivedNewData
   // demuxing or seeking operations that could affect the value of this flag.
   // This is in order to ensure that we will retry once they complete as we may
   // now have new data that could potentially allow those operations to
   // successfully complete if tried again.
   if (decoder.mSeekRequest.Exists()) {
     // Nothing more to do until this operation complete.
     return true;
   }
+
+  if (aTrack == TrackType::kVideoTrack && mSkipRequest.Exists()) {
+    LOGV("Skipping in progress, nothing more to do");
+    return true;
+  }
+
   if (decoder.mDemuxRequest.Exists()) {
     // We may have pending operations to process, so we want to continue
     // after UpdateReceivedNewData returns.
     return false;
   }
 
   if (decoder.mDrainComplete || decoder.mDraining) {
     // We do not want to clear mWaitingForData or mDemuxEOS while
@@ -1098,21 +1104,16 @@ MediaFormatReader::Update(TrackType aTra
   bool needOutput = false;
   auto& decoder = GetDecoderData(aTrack);
   decoder.mUpdateScheduled = false;
 
   if (!mInitDone) {
     return;
   }
 
-  if (aTrack == TrackType::kVideoTrack && mSkipRequest.Exists()) {
-    LOGV("Skipping in progress, nothing more to do");
-    return;
-  }
-
   if (UpdateReceivedNewData(aTrack)) {
     LOGV("Nothing more to do");
     return;
   }
 
   if (decoder.mSeekRequest.Exists()) {
     LOGV("Seeking hasn't completed, nothing more to do");
     return;