From 5203c55c49323fa7b578cba0581f85c21421a8ca Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Wed, 14 Dec 2016 17:35:36 +1100 Subject: [PATCH] Bug 1319992: P5. Don't attempt to estimate readyState when ended. r=jwwang Buffered range is now calculated asynchronously. It may not be up to date by the time the MDSM has entered ended mode. There's no point estimating readyState in ended mode anyway: we know what it is... MozReview-Commit-ID: ErGsAwBzeXI --HG-- extra : rebase_source : db3bde99b21f5b4377ce88509979f1499b1cd677 --- dom/html/HTMLMediaElement.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp index 15f895475d6a..d9eebef3ea96 100644 --- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -5474,7 +5474,7 @@ HTMLMediaElement::UpdateReadyStateInternal() // 6. Suspend playback. // Note: Playback will already be stalled, as the next frame is // unavailable. - } else if (mDecoder) { + } else if (mDecoder && !mDecoder->IsEnded()) { nextFrameStatus = mDecoder->NextFrameBufferedStatus(); } }