mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1147435 - Fix SetDormant() handling in MediaOmxCommonDecoder r=cpearce
This commit is contained in:
parent
64fec42b5d
commit
3a579f22dc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user