[FFmpeg-devel] [PATCH] MP3: ID3V2 corrupted => bad offset

Måns Rullgård mans
Fri Dec 5 15:18:03 CET 2008

Yvan Labadie wrote:
> Hi,
> According to the ID3v2 standard, frame sizes are stored using 32bit
> SynchSafe Integer format
> (http://www.id3.org/id3v2.4.0-structure?highlight=%28SynchSafe%29).
> That's why libavformat/mp3.c uses id3v2_get_size() function.
> But I discovered that a lot of mp3 (about a fourth of my mp3s!) use
> classic 32bit unsigned integer!!!
> So with these mp3s ID3v2 parse fails and then
> AVFormatContext->data_offset is invalid!

ID3v2.3 and earlier used a plain integer.  The "sync safe" encoding was
introduced in v2.4.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list