[FFmpeg-devel] [PATCH] MP3: ID3V2 corrupted => bad offset
Fri Dec 5 15:37:03 CET 2008
Michael Niedermayer wrote:
> 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
That said, I wouldn't be very surprised if there are files out there
with any kind of errors. We're talking about mp3 files afters all...
mans at mansr.com
More information about the ffmpeg-devel