Bug 1125970 - Don't flush decode task queue in MediaDecoderStateMachine::FlushDecoding(). r=bholley a=lmandel
authorChris Pearce <cpearce@mozilla.com>
Fri, 13 Feb 2015 16:53:31 -0800
changeset 249935 74c5dedf63e9e38baf52980e4116b7bc5945c870
parent 249934 0804aec59497d8bade6237362f95ed0939c1bc4b
child 249936 a48f841801e08e28b6566a4672b161f59808fae7
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley, lmandel
bugs1125970
milestone37.0a2
Bug 1125970 - Don't flush decode task queue in MediaDecoderStateMachine::FlushDecoding(). r=bholley a=lmandel
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2933,17 +2933,18 @@ MediaDecoderStateMachine::FlushDecoding(
     // decoding operations and run any pending callbacks. This is
     // important, as we don't want any pending tasks posted to the task
     // queue by the reader to deliver any samples after we've posted the
     // reader Shutdown() task below, as the sample-delivery tasks will
     // keep video frames alive until after we've called Reader::Shutdown(),
     // and shutdown on B2G will fail as there are outstanding video frames
     // alive.
     ReentrantMonitorAutoExit exitMon(mDecoder->GetReentrantMonitor());
-    DecodeTaskQueue()->FlushAndDispatch(task);
+    DecodeTaskQueue()->Dispatch(task);
+    DecodeTaskQueue()->AwaitIdle();
   }
 
   // We must reset playback so that all references to frames queued
   // in the state machine are dropped, else subsequent calls to Shutdown()
   // or ReleaseMediaResources() can fail on B2G.
   ResetPlayback();
 }