Bug 1312886: P2. Never move past HAVE_FUTURE_DATA if we're waiting for a key, r=cpearce

MozReview-Commit-ID: KWERB7zWXPZ
This commit is contained in:
Jean-Yves Avenard
2016-10-27 16:36:37 +11:00
parent 8c54938f57
commit e8d8b147cc

View File

@@ -4796,7 +4796,7 @@ HTMLMediaElement::UpdateReadyStateInternal()
// autoplay elements for live streams will never play. Otherwise we
// move to HAVE_ENOUGH_DATA if we can play through the entire media
// without stopping to buffer.
if (mDecoder->CanPlayThrough()) {
if (mWaitingForKey == NOT_WAITING_FOR_KEY && mDecoder->CanPlayThrough()) {
LOG(LogLevel::Debug, ("MediaElement %p UpdateReadyStateInternal() "
"Decoder can play through", this));
ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_ENOUGH_DATA);