Bug 1147435 - Fix SetDormant() handling in MediaOmxCommonDecoder r=cpearce

This commit is contained in:
Sotaro Ikeda 2015-03-26 20:57:42 -07:00
parent 64fec42b5d
commit 3a579f22dc

View File

@ -101,7 +101,13 @@ MediaOmxCommonDecoder::PauseStateMachine()
if (!mDecoderStateMachine) {
return;
}
mDecoderStateMachine->SetDormant(true);
// enter dormant state
RefPtr<nsRunnable> event =
NS_NewRunnableMethodWithArg<bool>(
mDecoderStateMachine,
&MediaDecoderStateMachine::SetDormant,
true);
mDecoderStateMachine->TaskQueue()->Dispatch(event);
}
void
@ -124,7 +130,13 @@ MediaOmxCommonDecoder::ResumeStateMachine()
mNextState = mPlayState;
ChangeState(PLAY_STATE_LOADING);
mDecoderStateMachine->SetDormant(false);
// exit dormant state
RefPtr<nsRunnable> event =
NS_NewRunnableMethodWithArg<bool>(
mDecoderStateMachine,
&MediaDecoderStateMachine::SetDormant,
false);
mDecoderStateMachine->TaskQueue()->Dispatch(event);
}
void