diff --git a/dom/media/MediaDecoderStateMachine.cpp b/dom/media/MediaDecoderStateMachine.cpp index ea6f7827ff90..d856b417e1a3 100644 --- a/dom/media/MediaDecoderStateMachine.cpp +++ b/dom/media/MediaDecoderStateMachine.cpp @@ -471,10 +471,6 @@ bool MediaDecoderStateMachine::HaveEnoughDecodedVideo() { MOZ_ASSERT(OnTaskQueue()); - if (IsVideoDecodeSuspended()) { - return true; - } - if (VideoQueue().GetSize() == 0) { return false; } @@ -1805,13 +1801,6 @@ MediaDecoderStateMachine::EnsureVideoDecodeTaskQueued() return NS_OK; } - if (IsVideoDecodeSuspended() && !IsDecodingFirstFrame()) { - // The element is invisible and background videos should be suspended. - // If the first frame has already been decoded, don't request anymore video - // frames. - return NS_OK; - } - if (!IsVideoDecoding() || mReader->IsRequestingVideoData() || mReader->IsWaitingVideoData()) { return NS_OK; @@ -2637,12 +2626,6 @@ bool MediaDecoderStateMachine::IsStateMachineScheduled() const return mDispatchedStateMachine || mDelayedScheduler.IsScheduled(); } -bool MediaDecoderStateMachine::IsVideoDecodeSuspended() const -{ - MOZ_ASSERT(OnTaskQueue()); - return mIsReaderSuspended; -} - void MediaDecoderStateMachine::LogicalPlaybackRateChanged() { diff --git a/dom/media/MediaDecoderStateMachine.h b/dom/media/MediaDecoderStateMachine.h index 314b45498d60..51602996b67a 100644 --- a/dom/media/MediaDecoderStateMachine.h +++ b/dom/media/MediaDecoderStateMachine.h @@ -598,10 +598,6 @@ protected: // case as it may not be needed again. bool IsPausedAndDecoderWaiting(); - // Returns true if the video decoding is suspended because the element is not - // visible - bool IsVideoDecodeSuspended() const; - // These return true if the respective stream's decode has not yet reached // the end of stream. bool IsAudioDecoding();