mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
avcodec/aac_ac3_parser: account for data already in the parsing buffer
If a frame starts very close to a packet boundary, the start code may already have been added to the parsing buffer, indicated by a small negative value of "i", while the header is still being tracked in the "state" variable. Reduce the remaining size accordingly, otherwise trying to find the next frame could skip over the frame header and lump two frames together as one.
This commit is contained in:
parent
250792be5e
commit
8df8a92993
@ -60,6 +60,9 @@ get_next:
|
||||
s->remaining_size += i;
|
||||
goto get_next;
|
||||
}
|
||||
else if (i < 0) {
|
||||
s->remaining_size += i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user