зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1258922: [MSE] P4. Set draining flag to true when skip to next keyframe failed. r=gerald
data promise is only resolved once the decoder has been drained. It was possible for a promise to never be resolved if skipping to the next key frame failed. MozReview-Commit-ID: GimbQTImH9e
This commit is contained in:
Родитель
b2b17692f7
Коммит
92553ea442
|
@ -1447,6 +1447,15 @@ MediaFormatReader::OnVideoSkipFailed(MediaTrackDemuxer::SkipFailureHolder aFailu
|
|||
NotifyEndOfStream(TrackType::kVideoTrack);
|
||||
break;
|
||||
case DemuxerFailureReason::WAITING_FOR_DATA:
|
||||
// While there is nothing to drain considering the decoder has been
|
||||
// flushed in SkipVideoDemuxToNextKeyFrame, we need to set mNeedDraining
|
||||
// to true as the video MediaDataPromise will only be rejected once drain
|
||||
// has completed.
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mVideo.mDecodingRequested,
|
||||
"Reset must have been called");
|
||||
if (!mVideo.mWaitingForData) {
|
||||
mVideo.mNeedDraining = true;
|
||||
}
|
||||
NotifyWaitingForData(TrackType::kVideoTrack);
|
||||
break;
|
||||
case DemuxerFailureReason::CANCELED:
|
||||
|
|
Загрузка…
Ссылка в новой задаче