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
--- 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;