[Ffmpeg-devel] [PATCH] libavformat and ogg vorbis tags

Diego Biurrun diego
Sun Jan 7 01:30:02 CET 2007


On Wed, Jan 03, 2007 at 01:37:46AM +0200, Tatu Kilappa wrote:
> libavformat does not read all vorbis tags correctly. To be specific,
> album information is not read and author is read as AUTHOR instead of
> the vorbis standard tag ARTIST, which means the artist info is never
> found.
> 
> Included is a very short and simple patch to fix this. Apply it and the
> data is read correctly.
> 
> And as this is done, you can also remove the "//Too bored to add others
> for today" -comment 13 lines down. Unless the original author was going
> to do something else, that is.

> --- oggparsevorbis.c.original	2007-01-03 00:27:48.000000000 +0200
> +++ oggparsevorbis.c	2007-01-03 00:27:34.000000000 +0200
> @@ -87,7 +87,9 @@
>              ct[vl] = 0;
>  
>              // took from Vorbis_I_spec
> -            if (!strcmp (tt, "AUTHOR"))
> +	    if (!strcmp (tt, "ALBUM"))
> +                strncpy (as->album, ct, FFMIN(sizeof (as->author), vl));
> +	    else if (!strcmp (tt, "ARTIST"))
>                  strncpy (as->author, ct, FFMIN(sizeof (as->author), vl));
>              else if (!strcmp (tt, "TITLE"))
>                  strncpy (as->title, ct, FFMIN(sizeof (as->title), vl));

Looks OK to me.  Mans, you're the maintainer ...

Diego




More information about the ffmpeg-devel mailing list