Bug 1111518 - Fix the logic in MediaDecoder::CanPlayThrough(). r=jwwang
This commit is contained in:
@@ -3244,10 +3244,7 @@ void HTMLMediaElement::UpdateReadyStateForData(MediaDecoderOwner::NextFrameStatu
|
||||
// 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.
|
||||
MediaDecoder::Statistics stats = mDecoder->GetStatistics();
|
||||
if (stats.mTotalBytes < 0 ? stats.mDownloadRateReliable
|
||||
: stats.mTotalBytes == stats.mDownloadPosition ||
|
||||
mDecoder->CanPlayThrough())
|
||||
if (mDecoder->CanPlayThrough())
|
||||
{
|
||||
ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_ENOUGH_DATA);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user