Bug 968016 - Call MediaDecoderReader::OnDecodeThreadStart/Finish() in DecodeLoop(). r=kinetik

This commit is contained in:
Chris Pearce 2014-02-18 11:53:53 +13:00
parent a2cc5e0b6f
commit 81814d397d

View File

@ -281,6 +281,10 @@ void MediaDecoderStateMachine::DecodeThreadRun()
{
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
if (mReader) {
mReader->OnDecodeThreadStart();
}
if (mState == DECODER_STATE_DECODING_METADATA &&
NS_FAILED(DecodeMetadata())) {
NS_ASSERTION(mState == DECODER_STATE_SHUTDOWN,
@ -315,6 +319,10 @@ void MediaDecoderStateMachine::DecodeThreadRun()
}
}
if (mReader) {
mReader->OnDecodeThreadFinish();
}
DECODER_LOG(PR_LOG_DEBUG, ("%p Decode thread finished", mDecoder.get()));
mDispatchedEventToDecode = false;
mon.NotifyAll();