mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 517818. Wave decoder should not look beyond the Wave data area to see if we have a 'next frame' to play. r=kinetik
--HG-- extra : rebase_source : 9964f0fe36d35745354f5723b5d82b1fc18520d6
This commit is contained in:
parent
f98d7a8ba5
commit
07ec9a4619
@ -46,6 +46,7 @@ function startTests() {
|
||||
ok(Math.abs(v.currentTime - test.duration) < 0.1,
|
||||
test.name + " current time at end: " + v.currentTime);
|
||||
}
|
||||
is(v.readyState, v.HAVE_CURRENT_DATA, test.name + " checking readyState");
|
||||
ok(v.ended, test.name + " checking playback has ended");
|
||||
--testsWaiting;
|
||||
if (testsWaiting == 0) {
|
||||
|
@ -461,7 +461,12 @@ nsWaveStateMachine::GetNextFrameStatus()
|
||||
nsAutoMonitor monitor(mMonitor);
|
||||
if (mState == STATE_BUFFERING)
|
||||
return nsHTMLMediaElement::NEXT_FRAME_UNAVAILABLE_BUFFERING;
|
||||
if (mPlaybackPosition < mStream->GetCachedDataEnd(mPlaybackPosition))
|
||||
// If mMetadataValid is false then we can't call GetDataLength because
|
||||
// we haven't got the length from the Wave header yet. But we know that
|
||||
// if we haven't read the metadata then we don't have playable data.
|
||||
if (mMetadataValid &&
|
||||
mPlaybackPosition < mStream->GetCachedDataEnd(mPlaybackPosition) &&
|
||||
mPlaybackPosition < mWavePCMOffset + GetDataLength())
|
||||
return nsHTMLMediaElement::NEXT_FRAME_AVAILABLE;
|
||||
return nsHTMLMediaElement::NEXT_FRAME_UNAVAILABLE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user