diff options
author | Andreas Rheinhardt <[email protected]> | 2025-07-11 22:26:21 +0200 |
---|---|---|
committer | Andreas Rheinhardt <[email protected]> | 2025-09-15 17:52:21 +0200 |
commit | bd80640caeb07dfc3656a6b680fde2da2e46af5b (patch) | |
tree | cfa748de31bc861dae45f4f757070d36e48cf069 /libavformat/caf.c | |
parent | 987c955cd7e972d9940284fa6ae7187ac858ebb1 (diff) |
avformat/oggdec: Don't skip over data whose checksum is used
The behavior of the ffio_*_checksum feature is not well defined
when using avio_skip(). The code in oggdec.c relied on the skipped
data (four bytes) to be checksummed, which is mostly true
because short_seek_threshold is 32768 by default, so that
avio_seek() will normally read data instead of calling the
underlying seek function. Yet this has two problems:
a) It relies on implementation details of avio_seek().
b) There is an exception, namely if the AVIO_FLAG_DIRECT is set.
In this case the underlying seek function (if set) is always
called and the data is skipped, leading to CRC errors.
So don't skip the data.
Signed-off-by: Andreas Rheinhardt <[email protected]>
Diffstat (limited to 'libavformat/caf.c')
0 files changed, 0 insertions, 0 deletions