зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1226707: P2 Ensure we won't operate on a decoder that failed to initialize. r=cpearce
This commit is contained in:
Родитель
ef21ca8081
Коммит
1deba9f634
|
@ -419,6 +419,8 @@ MediaFormatReader::EnsureDecoderInitialized(TrackType aTrack)
|
||||||
[self, aTrack] (MediaDataDecoder::DecoderFailureReason aResult) {
|
[self, aTrack] (MediaDataDecoder::DecoderFailureReason aResult) {
|
||||||
auto& decoder = self->GetDecoderData(aTrack);
|
auto& decoder = self->GetDecoderData(aTrack);
|
||||||
decoder.mInitPromise.Complete();
|
decoder.mInitPromise.Complete();
|
||||||
|
decoder.mDecoder->Shutdown();
|
||||||
|
decoder.mDecoder = nullptr;
|
||||||
self->NotifyError(aTrack);
|
self->NotifyError(aTrack);
|
||||||
}));
|
}));
|
||||||
return false;
|
return false;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче