diff --git a/dom/media/MediaDecoderStateMachine.cpp b/dom/media/MediaDecoderStateMachine.cpp index c039ce7eb96f..970896bded21 100644 --- a/dom/media/MediaDecoderStateMachine.cpp +++ b/dom/media/MediaDecoderStateMachine.cpp @@ -2941,8 +2941,7 @@ MediaDecoderStateMachine::FlushDecoding() // and shutdown on B2G will fail as there are outstanding video frames // alive. ReentrantMonitorAutoExit exitMon(mDecoder->GetReentrantMonitor()); - DecodeTaskQueue()->Dispatch(task); - DecodeTaskQueue()->AwaitIdle(); + DecodeTaskQueue()->FlushAndDispatch(task); } // We must reset playback so that all references to frames queued