diff --git a/dom/media/MediaDecoderStateMachine.cpp b/dom/media/MediaDecoderStateMachine.cpp index c45a4625861d..f092df465e30 100644 --- a/dom/media/MediaDecoderStateMachine.cpp +++ b/dom/media/MediaDecoderStateMachine.cpp @@ -2868,6 +2868,12 @@ MediaDecoderStateMachine::SetAudioCaptured(bool aCaptured) return; } + // Rest these flags so they are consistent with the status of the sink. + // TODO: Move these flags into MediaSink to improve cohesion so we don't need + // to reset these flags when switching MediaSinks. + mAudioCompleted = false; + mVideoCompleted = false; + // Backup current playback parameters. MediaSink::PlaybackParams params = mMediaSink->GetPlaybackParams();