Bug 1361944. P2 - be sure to shut down the existing decoder before loading the next source child. r=cpearce

Otherwise we will fail the assertion (!mDecoder, "Shouldn't have a decoder")
in HTMLMediaElement::InitializeDecoderForChannel().

MozReview-Commit-ID: 1zShp0th3Uv
This commit is contained in:
JW Wang
2017-05-04 13:28:17 +08:00
parent fcfcc3c80c
commit d2cf59049a

View File

@@ -5249,6 +5249,10 @@ void HTMLMediaElement::DecodeError(const MediaResult& aError)
AudioTracks()->EmptyTracks();
VideoTracks()->EmptyTracks();
if (mIsLoadingFromSourceChildren) {
if (mDecoder) {
// Shut down the exiting decoder before loading the next source child.
ShutdownDecoder();
}
mErrorSink->ResetError();
if (mSourceLoadCandidate) {
DispatchAsyncSourceError(mSourceLoadCandidate);