mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1183519: P2. Reject promise if decoder couldn't be created. r=me
Follow-up fix.
This commit is contained in:
parent
784efbb8ba
commit
2b61689e5e
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user