Bug 1312886: P7. Handle case where nextFrameStatus jumps straight to NEXT_FRAME_UNAVAILABLE_BUFFERING. r=jwwang

Under some circumstances, we will go from NEXT_FRAME_AVAILABLE to NEXT_FRAME_UNAVAILABLE_BUFFERING directly. We handle this condition now

MozReview-Commit-ID: JVAQhsgzSp2

--HG--
extra : rebase_source : e615e17d49bd35ecb9cb7db84501489ec5e12903
This commit is contained in:
Jean-Yves Avenard 2016-10-27 21:12:20 +11:00
parent a7bf1da943
commit 7bf85d7878

View File

@ -4707,7 +4707,9 @@ HTMLMediaElement::UpdateReadyStateInternal()
}
enum NextFrameStatus nextFrameStatus = NextFrameStatus();
if (nextFrameStatus == NEXT_FRAME_UNAVAILABLE) {
if (nextFrameStatus == NEXT_FRAME_UNAVAILABLE ||
(nextFrameStatus == NEXT_FRAME_UNAVAILABLE_BUFFERING &&
mWaitingForKey == WAITING_FOR_KEY)) {
if (mWaitingForKey != NOT_WAITING_FOR_KEY) {
// http://w3c.github.io/encrypted-media/#wait-for-key
// Continuing 7.3.4 Queue a "waitingforkey" Event