зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1183519: P2. Reject promise if decoder couldn't be created. r=me
Follow-up fix.
This commit is contained in:
Родитель
74380052df
Коммит
2017f9a033
|
@ -976,9 +976,12 @@ MediaFormatReader::DrainDecoder(TrackType aTrack)
|
|||
if (!decoder.mNeedDraining || decoder.mDraining) {
|
||||
return;
|
||||
}
|
||||
decoder.mNeedDraining = false;
|
||||
if (!decoder.mDecoder) {
|
||||
return;
|
||||
}
|
||||
decoder.mOutputRequested = true;
|
||||
decoder.mDecoder->Drain();
|
||||
decoder.mNeedDraining = false;
|
||||
decoder.mDraining = true;
|
||||
LOG("Requesting %s decoder to drain", TrackTypeToStr(aTrack));
|
||||
}
|
||||
|
@ -1045,6 +1048,9 @@ MediaFormatReader::Update(TrackType aTrack)
|
|||
LOG("Waiting For Data");
|
||||
decoder.RejectPromise(WAITING_FOR_DATA, __func__);
|
||||
}
|
||||
} else if (decoder.mError && !decoder.mDecoder) {
|
||||
decoder.RejectPromise(DECODE_ERROR, __func__);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче