Revert "Bug 1188233: Ensure drainComplete flag is set upon failure to create decoder. r=cpearce"

This reverts commit 9c48bac3e0d3
This commit is contained in:
Jean-Yves Avenard 2015-07-28 16:36:10 +10:00
parent 9c03d00213
commit 1b782a5d02

View File

@ -984,13 +984,15 @@ MediaFormatReader::DrainDecoder(TrackType aTrack)
return;
}
decoder.mNeedDraining = false;
if (!decoder.mDecoder ||
decoder.mNumSamplesInput == decoder.mNumSamplesOutput) {
if (!decoder.mDecoder) {
return;
}
decoder.mOutputRequested = true;
if (decoder.mNumSamplesInput == decoder.mNumSamplesOutput) {
// No frames to drain.
NotifyDrainComplete(aTrack);
return;
}
decoder.mOutputRequested = true;
decoder.mDecoder->Drain();
decoder.mDraining = true;
LOG("Requesting %s decoder to drain", TrackTypeToStr(aTrack));