Bug 884182 - Prevent incorrect state transition. r=doublec

This commit is contained in:
Sotaro Ikeda 2013-06-25 20:08:58 -04:00
parent 4b4d3d8e70
commit 0b09286801
2 changed files with 2 additions and 2 deletions

View File

@ -1144,7 +1144,7 @@ void MediaDecoder::ChangeState(PlayState aState)
mNextState = PLAY_STATE_PAUSED;
}
if (mPlayState == PLAY_STATE_SHUTDOWN) {
if ((mPlayState == PLAY_STATE_LOADING && mIsDormant) || mPlayState == PLAY_STATE_SHUTDOWN) {
GetReentrantMonitor().NotifyAll();
return;
}

View File

@ -2044,7 +2044,7 @@ void MediaDecoderStateMachine::DecodeSeek()
}
}
mDecoder->StartProgressUpdates();
if (mState == DECODER_STATE_SHUTDOWN)
if (mState == DECODER_STATE_DORMANT || mState == DECODER_STATE_SHUTDOWN)
return;
// Try to decode another frame to detect if we're at the end...