[FFmpeg-devel] skip multiple id3v2 headers

Michael Niedermayer michaelni
Mon Sep 13 18:54:56 CEST 2010


On Mon, Sep 13, 2010 at 09:49:07AM -0700, David Byron wrote:
> > 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)

so id guess there is a bug and this doesnt fix it but rather just adds a hack
to recover.

either way arbitrary seek back doesnt work on non seekable media

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

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100913/457e3c96/attachment.pgp>



More information about the ffmpeg-devel mailing list