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

This commit is contained in:
Jean-Yves Avenard 2015-07-28 14:09:43 +10:00
Родитель bec365db4b
Коммит c7b835ce08
1 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -984,15 +984,13 @@ MediaFormatReader::DrainDecoder(TrackType aTrack)
return;
}
decoder.mNeedDraining = false;
if (!decoder.mDecoder) {
return;
}
decoder.mOutputRequested = true;
if (decoder.mNumSamplesInput == decoder.mNumSamplesOutput) {
if (!decoder.mDecoder ||
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));