Bug 968016 - Wait until decode has finished before releasing resources when decoder becomes dormant. r=kinetik

This commit is contained in:
Chris Pearce 2014-02-18 11:53:53 +13:00
parent 264b28d651
commit dbd3c0555b

View File

@ -1968,6 +1968,8 @@ nsresult MediaDecoderStateMachine::RunStateMachine()
mPendingWakeDecoder = nullptr;
{
ReentrantMonitorAutoExit exitMon(mDecoder->GetReentrantMonitor());
// Wait for the thread decoding, if any, to exit.
mDecodeTaskQueue->AwaitIdle();
mReader->ReleaseMediaResources();
}
return NS_OK;