mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 1185972
: P6. Ensure exiting dormant mode has completed seek before notifying decoder. r=jwwang
This commit is contained in:
parent
fa397ab3b4
commit
8d428f4bec
@ -1328,13 +1328,18 @@ void MediaDecoderStateMachine::StartDecoding()
|
||||
|
||||
if (mDecodingFirstFrame &&
|
||||
(IsRealTime() || mSentFirstFrameLoadedEvent)) {
|
||||
// if mSentFirstFrameLoadedEvent is set :
|
||||
// We're resuming from dormant state, so we don't need to request
|
||||
// the first samples in order to determine the media start time,
|
||||
// we have the start time from last time we loaded.
|
||||
FinishDecodeFirstFrame();
|
||||
if (IsRealTime()) {
|
||||
FinishDecodeFirstFrame();
|
||||
} else {
|
||||
// We're resuming from dormant state, so we don't need to request
|
||||
// the first samples in order to determine the media start time,
|
||||
// we have the start time from last time we loaded.
|
||||
// FinishDecodeFirstFrame will be launched upon completion of the seek when
|
||||
// we have data ready to play.
|
||||
MOZ_ASSERT(mQueuedSeek.Exists() && mSentFirstFrameLoadedEvent,
|
||||
"Return from dormant must have queued seek");
|
||||
}
|
||||
if (mQueuedSeek.Exists()) {
|
||||
// We are returning from dormant, complete any pending seek.
|
||||
mPendingSeek.Steal(mQueuedSeek);
|
||||
SetState(DECODER_STATE_SEEKING);
|
||||
ScheduleStateMachine();
|
||||
|
Loading…
Reference in New Issue
Block a user