[FFmpeg-devel] [PATCH] Handle metadata in oma demuxer

Aurelien Jacobs aurel
Wed Jun 2 17:55:15 CEST 2010


On Wed, Jun 02, 2010 at 09:58:45AM +0200, Michael Karcher wrote:
> Am Mittwoch, den 02.06.2010, 03:04 +0200 schrieb Michael Niedermayer:
> > > So like in the new attached patch?
> > > I decided to use a two-member struct because that allows pass-by-value,
> > > without having to think about endianness (which I would have to do if I
> > > pass as an int).
> > does thinking about that hurt? ;)
> If I pass the two bytes in an int

Huh... Just pass this as a string, this is simpler and more readable:

static const char *id3v2_ea3_magic "ea";

[...]

ff_id3v2_match(buf, id3v2_ea3_magic);

[...]

int ff_id3v2_match(const uint8_t *buf, char *magic)
{
    return  buf[0]         == magic[0] &&
            buf[1]         == magic[1] &&
            buf[2]         ==  '3' &&
[...]

Aurel



More information about the ffmpeg-devel mailing list