mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 10:57:34 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
b0eda70edf
12 changed files with 79 additions and 59 deletions
|
|
@ -819,8 +819,9 @@ ADTSTrackDemuxer::Read(uint8_t* aBuffer, int64_t aOffset, int32_t aSize)
|
|||
|
||||
const int64_t streamLen = StreamLength();
|
||||
if (mInfo && streamLen > 0) {
|
||||
int64_t max = streamLen > aOffset ? streamLen - aOffset : 0;
|
||||
// Prevent blocking reads after successful initialization.
|
||||
aSize = std::min<int64_t>(aSize, streamLen - aOffset);
|
||||
aSize = std::min<int64_t>(aSize, max);
|
||||
}
|
||||
|
||||
uint32_t read = 0;
|
||||
|
|
|
|||
|
|
@ -676,8 +676,9 @@ MP3TrackDemuxer::Read(uint8_t* aBuffer, int64_t aOffset, int32_t aSize) {
|
|||
|
||||
const int64_t streamLen = StreamLength();
|
||||
if (mInfo && streamLen > 0) {
|
||||
uint64_t max = streamLen > aOffset ? streamLen - aOffset : 0;
|
||||
// Prevent blocking reads after successful initialization.
|
||||
aSize = std::min<int64_t>(aSize, streamLen - aOffset);
|
||||
aSize = std::min<int64_t>(aSize, max);
|
||||
}
|
||||
|
||||
uint32_t read = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue