Bug 1298217. Part 3 - Remove the check for IsShutdown() from CheckIfDecodeComplete() because it is called only when mState is DECODING or BUFFERING. r=kaku

MozReview-Commit-ID: 80eWIjZnLAO

--HG--
extra : rebase_source : cc41e66fba57f7b2d0d7e583136e7e9fd8d9790e
This commit is contained in:
JW Wang 2016-08-26 06:06:20 +12:00
Родитель fe3759a62a
Коммит e44da8a1e4
1 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@ -826,14 +826,9 @@ void
MediaDecoderStateMachine::CheckIfDecodeComplete()
{
MOZ_ASSERT(OnTaskQueue());
MOZ_ASSERT(mState == DECODER_STATE_DECODING ||
mState == DECODER_STATE_BUFFERING);
if (IsShutdown() ||
mState == DECODER_STATE_SEEKING ||
mState == DECODER_STATE_COMPLETED) {
// Don't change our state if we've already been shutdown, or we're seeking,
// since we don't want to abort the shutdown or seek processes.
return;
}
if (!IsVideoDecoding() && !IsAudioDecoding()) {
// We've finished decoding all active streams,
// so move to COMPLETED state.