diff --git a/dom/media/DOMMediaStream.cpp b/dom/media/DOMMediaStream.cpp index daf4e57570ba..1b090422f540 100644 --- a/dom/media/DOMMediaStream.cpp +++ b/dom/media/DOMMediaStream.cpp @@ -600,11 +600,7 @@ DOMMediaStream::RemoveTrack(MediaStreamTrack& aTrack) // to block it in the port. Doing this for a locked track is still OK as it // will first block the track, then destroy the port. Both cause the track to // end. - // If the track has already ended, it's input port might be gone, so in those - // cases blocking the underlying track should be avoided. - if (!aTrack.Ended()) { - BlockPlaybackTrack(toRemove); - } + BlockPlaybackTrack(toRemove); DebugOnly removed = mTracks.RemoveElement(toRemove); MOZ_ASSERT(removed);