mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 481488. Report HAVE_ENOUGH_DATA when we load the entire file before we even have a decoded frame. r=doublec,sr=roc
--HG-- extra : rebase_source : 45c5ebfcab187ae1b04cbe489e113781f61d43b8
This commit is contained in:
parent
8caa418ee5
commit
ae111168f6
@ -1229,7 +1229,11 @@ void nsHTMLMediaElement::UpdateReadyStateForData(NextFrameStatus aNextFrame)
|
||||
return;
|
||||
}
|
||||
|
||||
if (aNextFrame != NEXT_FRAME_AVAILABLE && !mDecoder->IsEnded()) {
|
||||
nsMediaDecoder::Statistics stats = mDecoder->GetStatistics();
|
||||
|
||||
if (aNextFrame != NEXT_FRAME_AVAILABLE &&
|
||||
!mDecoder->IsEnded() &&
|
||||
stats.mDownloadPosition < stats.mTotalBytes) {
|
||||
ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA);
|
||||
if (!mWaitingFired && aNextFrame == NEXT_FRAME_UNAVAILABLE_BUFFERING) {
|
||||
DispatchAsyncSimpleEvent(NS_LITERAL_STRING("waiting"));
|
||||
@ -1239,7 +1243,6 @@ void nsHTMLMediaElement::UpdateReadyStateForData(NextFrameStatus aNextFrame)
|
||||
}
|
||||
|
||||
// Now see if we should set HAVE_ENOUGH_DATA
|
||||
nsMediaDecoder::Statistics stats = mDecoder->GetStatistics();
|
||||
if (stats.mTotalBytes < 0 || stats.mTotalBytes == stats.mDownloadPosition) {
|
||||
// If it's something we don't know the size of, then we can't
|
||||
// make an estimate, so let's just go straight to HAVE_ENOUGH_DATA,
|
||||
|
Loading…
Reference in New Issue
Block a user