From 1deba9f634c730096f517685226ad582c9e68e97 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Sat, 21 Nov 2015 22:16:16 +1100 Subject: [PATCH] Bug 1226707: P2 Ensure we won't operate on a decoder that failed to initialize. r=cpearce --- dom/media/MediaFormatReader.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dom/media/MediaFormatReader.cpp b/dom/media/MediaFormatReader.cpp index 2ac3e151f40e..236b0a8b804f 100644 --- a/dom/media/MediaFormatReader.cpp +++ b/dom/media/MediaFormatReader.cpp @@ -419,6 +419,8 @@ MediaFormatReader::EnsureDecoderInitialized(TrackType aTrack) [self, aTrack] (MediaDataDecoder::DecoderFailureReason aResult) { auto& decoder = self->GetDecoderData(aTrack); decoder.mInitPromise.Complete(); + decoder.mDecoder->Shutdown(); + decoder.mDecoder = nullptr; self->NotifyError(aTrack); })); return false;