Bug 1158293 - Fix ResumeStateMachine()'s seek handling r=cpearce

This commit is contained in:
Sotaro Ikeda 2015-04-29 08:36:49 -07:00
parent 4397f3f321
commit 36b10671a5

View File

@ -143,10 +143,19 @@ MediaOmxCommonDecoder::ResumeStateMachine()
mRequestedSeekTarget = SeekTarget(timeUsecs,
SeekTarget::Accurate,
MediaDecoderEventVisibility::Suppressed);
// Call Seek of MediaDecoderStateMachine to suppress seek events.
RefPtr<nsRunnable> event =
NS_NewRunnableMethodWithArg<SeekTarget>(
GetStateMachine(),
&MediaDecoderStateMachine::Seek,
mRequestedSeekTarget);
GetStateMachine()->TaskQueue()->Dispatch(event);
mRequestedSeekTarget.Reset();
mNextState = mPlayState;
ChangeState(PLAY_STATE_LOADING);
// exit dormant state
RefPtr<nsRunnable> event =
event =
NS_NewRunnableMethodWithArg<bool>(
GetStateMachine(),
&MediaDecoderStateMachine::SetDormant,