Bug 1238347 - stop prerolling when decoding starts if we are waiting for data. r=cpearce.

This commit is contained in:
JW Wang 2016-01-12 08:06:44 +08:00
parent c9f4e17922
commit 4574413b61

View File

@ -1392,8 +1392,8 @@ void MediaDecoderStateMachine::StartDecoding()
} }
// Reset other state to pristine values before starting decode. // Reset other state to pristine values before starting decode.
mIsAudioPrerolling = !DonePrerollingAudio(); mIsAudioPrerolling = !DonePrerollingAudio() && !mAudioWaitRequest.Exists();
mIsVideoPrerolling = !DonePrerollingVideo(); mIsVideoPrerolling = !DonePrerollingVideo() && !mVideoWaitRequest.Exists();
// Ensure that we've got tasks enqueued to decode data if we need to. // Ensure that we've got tasks enqueued to decode data if we need to.
DispatchDecodeTasksIfNeeded(); DispatchDecodeTasksIfNeeded();