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

Michael Niedermayer michaelni
Fri Dec 5 15:24:04 CET 2008

On Fri, Dec 05, 2008 at 02:18:03PM -0000, M?ns Rullg?rd wrote:
> 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.

that explains it, assuming all the failing files are < 2.4
a proper solution would then be to fix <2.4 support

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081205/79db87ac/attachment.pgp>

More information about the ffmpeg-devel mailing list