[FFmpeg-devel] [PATCH] avformat/mp3: large id3 tags break concatenated file detection

Michael Niedermayer michaelni at gmx.at
Fri Apr 24 16:35:11 CEST 2015


On Fri, Apr 24, 2015 at 12:26:39PM +0200, wm4 wrote:
> If the file size is much larger than what is indicated in the XING
> header, the demuxer assumes it's a concatenated file, and throws away
> the (presumably) incorrect duration information. Unfortunately, this
> also triggers if the id3 tags are very large (embedded pictures and
> such). Then the half-baked heuristic not only breaks the duration
> display, but also gapless audio.
> 
> Fix it by subtracting the size of the headers (the check is off by some
> bytes, but that doesn't matter at all). Note that there could be an
> arbitrary amount of tags _after_ the mp3 data, but hopefully these are
> not too large to trigger the heuristic in practice.
> 
> Also add a warning when this happens.
> ---
>  libavformat/mp3dec.c | 3 +++
>  1 file changed, 3 insertions(+)

applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150424/de725d89/attachment.asc>


More information about the ffmpeg-devel mailing list