[FFmpeg-devel] [PATCH] TTA metadata support
Jai Menon
jmenon86
Wed Dec 16 17:37:34 CET 2009
On Wed, Dec 16, 2009 at 05:22:37PM +0100, Diego Biurrun wrote:
> On Wed, Dec 16, 2009 at 08:39:55PM +0530, Jai Menon wrote:
> > On Wed, Dec 16, 2009 at 08:32:17PM +0530, Jai Menon wrote:
> > >
> > > Attached patch adds id3v[12] support to the tta demuxer.
> >
> > ...and of course the attachment was missing.
> >
> > --- a/libavformat/tta.c
> > +++ b/libavformat/tta.c
> > @@ -29,6 +31,11 @@ typedef struct {
> > static int tta_probe(AVProbeData *p)
> > {
> > const uint8_t *d = p->buf;
> > +
> > + if(ff_id3v2_match(d)) {
> > + d += ff_id3v2_tag_len(d);
> > + }
>
> Use 'if (' and drop the {} like
>
> > if (d[0] == 'T' && d[1] == 'T' && d[2] == 'A' && d[3] == '1')
> > return 80;
>
> here and
>
> > @@ -39,8 +46,13 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
> > +
> > + ff_id3v2_read(s);
> > + if (!av_metadata_get(s->metadata, "", NULL, AV_METADATA_IGNORE_SUFFIX))
> > + ff_id3v1_read(s);
>
> here and
>
> > + start_offset = url_ftell(s->pb);
> > if (get_le32(s->pb) != AV_RL32("TTA1"))
> > return -1; // not tta file
>
> here.
Cosmetic fixes made locally. I'll wait for the maintainer to comment
before posting a revised version.
--
Jai Menon
More information about the ffmpeg-devel
mailing list