mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
[DOM media] Handle truncated WAV stream.
This commit is contained in:
parent
232f5a4705
commit
b4306c0468
1 changed files with 2 additions and 1 deletions
|
|
@ -611,7 +611,8 @@ WAVTrackDemuxer::Read(uint8_t* aBuffer, int64_t aOffset, int32_t aSize)
|
|||
{
|
||||
const int64_t streamLen = StreamLength();
|
||||
if (mInfo && streamLen > 0) {
|
||||
aSize = std::min<int64_t>(aSize, streamLen - aOffset);
|
||||
int64_t max = streamLen > aOffset ? streamLen - aOffset : 0;
|
||||
aSize = std::min<int64_t>(aSize, max);
|
||||
}
|
||||
uint32_t read = 0;
|
||||
const nsresult rv = mSource.ReadAt(aOffset,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue