mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 23:05:42 +00:00
Bug 1274933: Reject data promise when EOS is encountered following waiting for data. r=gerald
MozReview-Commit-ID: 1hKplz5wFnJ --HG-- extra : rebase_source : 301821b51146e5cc7273f86b53b16c1e6ef6ca08
This commit is contained in:
parent
0304c38349
commit
708b1db5db
@ -1205,6 +1205,15 @@ MediaFormatReader::Update(TrackType aTrack)
|
||||
LOGV("Nothing more to do");
|
||||
return;
|
||||
}
|
||||
} else if (decoder.mDemuxEOS && !decoder.mNeedDraining &&
|
||||
!decoder.mDraining && !decoder.mDrainComplete &&
|
||||
decoder.mQueuedSamples.IsEmpty()) {
|
||||
// It is possible to transition from WAITING_FOR_DATA directly to EOS
|
||||
// state during the internal seek; in which case no draining would occur.
|
||||
// There is no more samples left to be decoded and we are already in
|
||||
// EOS state. We can immediately reject the data promise.
|
||||
LOG("Rejecting %s promise: EOS", TrackTypeToStr(aTrack));
|
||||
decoder.RejectPromise(END_OF_STREAM, __func__);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user