Bug 466557. Don't let the Ogg decoder get stuck in states when unexpected transitions happen. r=doublec,sr=roc

This commit is contained in:
Chris Pearce 2008-12-09 13:49:24 +13:00
Родитель 1e1a937513
Коммит e7b670232e
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -916,7 +916,7 @@ nsresult nsOggDecodeStateMachine::Run()
OggPlayErrorCode r = DecodeFrame();
mon.Enter();
if (mState == DECODER_STATE_SHUTDOWN)
if (mState != DECODER_STATE_DECODING)
continue;
// Get the decoded frame and store it in our queue of decoded frames
@ -1030,7 +1030,7 @@ nsresult nsOggDecodeStateMachine::Run()
case DECODER_STATE_COMPLETED:
{
while (mState != DECODER_STATE_SHUTDOWN &&
while (mState == DECODER_STATE_COMPLETED &&
!mDecodedFrames.IsEmpty()) {
PlayFrame();
if (mState != DECODER_STATE_SHUTDOWN) {
@ -1041,7 +1041,7 @@ nsresult nsOggDecodeStateMachine::Run()
}
}
if (mState == DECODER_STATE_SHUTDOWN)
if (mState != DECODER_STATE_COMPLETED)
continue;
nsCOMPtr<nsIRunnable> event =