[FFmpeg-devel] skip multiple id3v2 headers

Michael Niedermayer michaelni
Tue Sep 14 02:46:45 CEST 2010

On Mon, Sep 13, 2010 at 03:12:52PM -0700, David Byron wrote:
> > I can also modify a file with a hex editor so it fails to
> > be read with any code i want it to fail with.
> > what kind of argument is that supposed to be?
> The kind that is convincing enough to change the code.  Just because I used
> a hex editor doesn't mean the files don't exist out in the world.
> > i can create a file that works without your patch and
> > fails with your patch for example if i wanted
> I'm sure this is possible.  To me that just means there's more work to do.
> In the meantime, my patch seems like an improvement.
> > The questions are
> > 1. Do such files exist out there
> Possibly, yes.
> > 2. if yes, why does our code fail
> > 
> > once we know why it fails we can think about how to fix that.
> We know why it fails.  That's what I showed in the last message.  I actually
> see two failures here:

the question is why the tags parsing code fails to begin with.
The awnser is because you changed a field to an invalid value with a
hex editor, the solution is dont do that.

> 1. ff_id3v2_parse leaves the buffer pointing in the middle of an id3v2 frame

if the code fails you do NOT know if you are at the end, after the
end or in the middle of the frame.
It makes alot of sense to opt toward a earlier position than a later one and
let the mp3 parser extract what it can

> 2. the code that follows that determines what's mpeg audio isn't correct
> since av_read_frame returns a packet with a bunch of leading zeroes.  I'm
> fine to work on this angle as well.

dont waste your time, the code works as it is intended to work.

Find a bug before trying to fix it

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are 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/20100914/0aec168e/attachment.pgp>

More information about the ffmpeg-devel mailing list