[FFmpeg-devel] [PATCH] use new metadata api for vorbiscomment
Aurelien Jacobs
aurel
Thu Feb 12 00:35:11 CET 2009
M?ns Rullg?rd wrote:
> Justin Ruggles <justin.ruggles at gmail.com> writes:
>
> > Hi,
> >
> > This patch is from Aurel. I have tested it and am submitting it here for
> > approval.
> >
> > -Justin
> >
> >
> > Index: libavformat/oggparsevorbis.c
> > ===================================================================
> > --- libavformat/oggparsevorbis.c (revision 17145)
> > +++ libavformat/oggparsevorbis.c (working copy)
> > @@ -81,21 +81,7 @@
> > memcpy(ct, v, vl);
> > ct[vl] = 0;
> >
> > - // took from Vorbis_I_spec
> > - if (!strcmp(tt, "AUTHOR") || !strcmp(tt, "ARTIST"))
> > - av_strlcpy(as->author, ct, sizeof(as->author));
> > - else if (!strcmp(tt, "TITLE"))
> > - av_strlcpy(as->title, ct, sizeof(as->title));
> > - else if (!strcmp(tt, "COPYRIGHT"))
> > - av_strlcpy(as->copyright, ct, sizeof(as->copyright));
> > - else if (!strcmp(tt, "DESCRIPTION"))
> > - av_strlcpy(as->comment, ct, sizeof(as->comment));
> > - else if (!strcmp(tt, "GENRE"))
> > - av_strlcpy(as->genre, ct, sizeof(as->genre));
> > - else if (!strcmp(tt, "TRACKNUMBER"))
> > - as->track = atoi(ct);
> > - else if (!strcmp(tt, "ALBUM"))
> > - av_strlcpy(as->album, ct, sizeof(as->album));
> > + av_metadata_set(&as->metadata, tt, ct);
> > }
> > }
>
> OK
Applied.
Aurel
More information about the ffmpeg-devel
mailing list