[FFmpeg-devel] skip multiple id3v2 headers

David Byron dbyron
Mon Sep 13 18:49:07 CEST 2010


> but above all, why this patch?
> what does this fix?

I should have sent it separately because it's independent of the other ones.
Here's a version with the nits fixed I hope.

If a file has a bogus frame in an id3v2 tag, this patch makes sure
av_read_frame doesn't return part of the tag as audio data.

Without patch:

$ ./iterate_frames two_id3v2_with_fake_mpeg_small.mp3
Format detected only with low score of 24, misdetection possible!
"two_id3v2_with_fake_mpeg_small.mp3": frame 0: offset: 14207, size 1129
byte(s)
"two_id3v2_with_fake_mpeg_small.mp3": 1 frame(s), 1129 byte(s)

With patch:

$ ./iterate_frames two_id3v2_with_fake_mpeg_small.mp3
Format detected only with low score of 24, misdetection possible!
[mp3 @ 0x2a4c070] "two_id3v2_with_fake_mpeg_small.mp3": bogus tag length:
1073741824
"two_id3v2_with_fake_mpeg_small.mp3": frame 0: offset: 14207, size 627
byte(s)
"two_id3v2_with_fake_mpeg_small.mp3": 1 frame(s), 627 byte(s)

-DB



More information about the ffmpeg-devel mailing list