diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp index 65868201ba9a..68b74699f250 100644 --- a/dom/media/MediaDecoder.cpp +++ b/dom/media/MediaDecoder.cpp @@ -281,6 +281,9 @@ void MediaDecoder::DestroyDecodedStream() if (GetDecodedStream()) { GetStateMachine()->ResyncMediaStreamClock(); + } else { + // Avoid the redundant blocking to output stream. + return; } // All streams are having their SourceMediaStream disconnected, so they @@ -842,7 +845,7 @@ void MediaDecoder::PlaybackEnded() if (mShuttingDown || mPlayState == PLAY_STATE_SEEKING || - (mPlayState == PLAY_STATE_LOADING)) { + mPlayState == PLAY_STATE_LOADING) { return; }