Bug 1111518 - Fix the logic in MediaDecoder::CanPlayThrough(). r=jwwang

This commit is contained in:
Jonathan Hao
2014-12-17 15:05:40 +08:00
parent d51da3d0b9
commit 3057dff8fa
2 changed files with 6 additions and 6 deletions

View File

@@ -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;