diff --git a/dom/media/MediaDecoderStateMachine.cpp b/dom/media/MediaDecoderStateMachine.cpp index cb1d5d7e05bb..8c0c1ba0ef09 100644 --- a/dom/media/MediaDecoderStateMachine.cpp +++ b/dom/media/MediaDecoderStateMachine.cpp @@ -944,12 +944,6 @@ public: { mSeekJob = Move(aSeekJob); - // Dispatch a mozvideoonlyseekbegin event to indicate UI for corresponding - // changes. - if (mSeekJob.mTarget->IsVideoOnly()) { - mMaster->mOnPlaybackEvent.Notify(MediaEventType::VideoOnlySeekBegin); - } - // Always switch off the blank decoder otherwise we might become visible // in the middle of seeking and won't have a valid video frame to show // when seek is done. @@ -959,6 +953,12 @@ public: Reader()->SetVideoBlankDecode(false); } + // Dispatch a mozvideoonlyseekbegin event to indicate UI for corresponding + // changes. + if (mSeekJob.mTarget->IsVideoOnly()) { + mMaster->mOnPlaybackEvent.Notify(MediaEventType::VideoOnlySeekBegin); + } + // Don't stop playback for a video-only seek since audio is playing. if (!mSeekJob.mTarget->IsVideoOnly()) { mMaster->StopPlayback();