Bug 1511607 - don't suspend background video decoding for unseekable media. r=jya

Differential Revision: https://phabricator.services.mozilla.com/D14821

--HG--
extra : moz-landing-system : lando
This commit is contained in:
John Lin 2018-12-18 19:46:16 +00:00
Родитель 7c5190820e
Коммит 9abf52aa0f
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -974,6 +974,14 @@ void MediaDecoder::UpdateVideoDecodeMode() {
return;
}
// Seeking is required when leaving suspend mode.
if (!mMediaSeekable) {
LOG("UpdateVideoDecodeMode(), set Normal because the media is not "
"seekable");
mDecoderStateMachine->SetVideoDecodeMode(VideoDecodeMode::Normal);
return;
}
// If mHasSuspendTaint is set, never suspend the video decoder.
if (mHasSuspendTaint) {
LOG("UpdateVideoDecodeMode(), set Normal because the element has been "