[FFmpeg-devel] skip multiple id3v2 headers

David Byron dbyron
Wed Sep 15 01:39:54 CEST 2010


> > We know where the id3v2 tag ends.
> 
> no you dont
>
> you know parsing the id3v2 tag failed you dont know why it
> failed.

Ignoring for the moment how that field became invalid, isn't it clear that
parsing failed because the length of one frame is invalid?

> you only "know" it because you changed one field and not the
> other by hand.

What other field?

> > Maybe the bug is only in the documentation,
> 
> yes, ive fixed that

Thanks.  Now it's clear that av_read_packet is a lot less helpful than I
think it could be.  Do you have a suggestion for how to get at the undecoded
audio in a file?

Is there a way to find out what subset of each packet is audio?
avcodec_decode_audio3 doesn't seem to help in this case as it returns -1 on
the one packet that av_read_packet returns.  I guess this means if I wanted
to play the audio in this file I couldn't do that either.

$ ./iterate_frames bad_id3v2_with_one_frame.mp3
Format detected only with low score of 24, misdetection possible!
[mp3 @ 0x16ec2d0] Header missing
"bad_id3v2_with_one_frame.mp3": frame 1: offset: 7417, size 1129 byte(s), -1
byte(s) decoded, actual_frame_size: 204032
bad_id3v2_with_one_frame.mp3: key: "TIT2", value: "Loc-Exclusive Prelude"
bad_id3v2_with_one_frame.mp3: key: "TPE1", value: "Outkast"
bad_id3v2_with_one_frame.mp3: key: "TALB", value: "Outskirts: The Unofficial
Lost Outkast Remixes Disc 2"
bad_id3v2_with_one_frame.mp3: key: "TCON", value: "Southern Rap"
bad_id3v2_with_one_frame.mp3: key: "TCOM", value: "DJ Jamad & Floyd The
Locsmif"
bad_id3v2_with_one_frame.mp3: key: "TYER", value: "2004"
bad_id3v2_with_one_frame.mp3: key: "TBPM", value: "111.150000"
bad_id3v2_with_one_frame.mp3: key: "TPOS", value: "2/2"
bad_id3v2_with_one_frame.mp3: key: "TRCK", value: "14/19"
bad_id3v2_with_one_frame.mp3: key: "ALBUMARTIST", value: "Outkast"
bad_id3v2_with_one_frame.mp3: key: "YEARREL", value: "2004"
bad_id3v2_with_one_frame.mp3: key: "GRACENOTEEXTDATA", value:
"GNXDWEcxAR6RX458cpjFaIdoAM1jL5/wD4tgqnpmEcPZlZde5Qcjet6ZSlR1bje5VnTFo+y7/L+
v1JO1TOno8/+TvianR0V0ZwyBDaP02MuD5ef0DoeJPvF7/6U6qVWFvEIuWvRvdnk="
"bad_id3v2_with_one_frame.mp3": 1 frame(s), 1129 byte(s)

-DB
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: iterate_frames.c
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100914/d893b270/attachment.asc>



More information about the ffmpeg-devel mailing list