Opened 3 months ago
Last modified 8 weeks ago
#10837 new defect
mp3_read_header might break seekback
Reported by: | noseglid | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avformat |
Version: | 6.1 | Keywords: | mp3 |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
I've found an issue in ffmpeg 6.x.x and greater - and I've tracked it down to this commit: https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/0d17f5228f4d3854066ec1001f69c7d1714b0df9
What happens here is that it tries to minimize the amount of seeks - but this breaks the ffio_ensure_seekback
calls.
ffio_ensure_seekback
ensures seekback from the current position in the buffer.
As the loop no longer seeks back to the beginning of the buffer every iteration of, it might move the buffer ahead of off
.
Before returning, it tries to reset the position to off
or off+i
depending if there's junk or not. If the buffer has moved ahead of this it will either;
- Invoke a real seek if there is a
seek
function - Fail with
AVERROR(EPIPE)
if there is not.
I think either this commit has to be reversed - or it must ensure seekback for the maximum bytes it might read (64*1024+4) before the loop starts.
Change History (1)
comment:1 by , 8 weeks ago
Priority: | normal → important |
---|---|
Version: | unspecified → 6.1 |