#10837 closed defect (fixed)
mp3_read_header might break seekback
| Reported by: | noseglid | Owned by: | |
|---|---|---|---|
| Priority: | important | Component: | avformat |
| Version: | 6.1 | Keywords: | mp3 regression |
| Cc: | Marton Balint | 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
seekfunction - 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.
Attachments (1)
Change History (7)
comment:1 by , 3 years ago
| Priority: | normal → important |
|---|---|
| Version: | unspecified → 6.1 |
comment:2 by , 3 years ago
by , 3 years ago
| Attachment: | 0001-avformat-mp3dec-only-call-ffio_ensure_seekback-once.patch added |
|---|
comment:5 by , 2 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Fixed in b0053172199b54a806a4147cda8567a2f1823bc0.
comment:6 by , 2 years ago
BTW, Marton, we still need to address that crazy commit: https://patchwork.ffmpeg.org/project/ffmpeg/patch/CAPUDrwd7Sht+GfshJEPpxudzH930aiw2Bfb7dbrGNjMWQcyE2g@mail.gmail.com/
It is still applied in chromium.



Any chance we can get some eyes on this? It's stopping us from upgrading to the latest ffmpeg version.