diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp index f9cb426a7faf..588d07a58db5 100644 --- a/dom/media/MediaDecoder.cpp +++ b/dom/media/MediaDecoder.cpp @@ -503,6 +503,9 @@ MediaDecoder::Shutdown() mResource->Close(); } + // Ask the owner to remove its audio/video tracks. + GetOwner()->RemoveMediaTracks(); + ChangeState(PLAY_STATE_SHUTDOWN); mOwner = nullptr; }