[FFmpeg-cvslog] r17164 - trunk/libavformat/oggparsevorbis.c

Reimar Döffinger Reimar.Doeffinger
Fri Feb 13 11:40:07 CET 2009


On Thu, Feb 12, 2009 at 12:34:58AM +0100, aurel wrote:
> Log:
> use new metadata API in ogg/vorbis demuxer
> 
> Modified:
>    trunk/libavformat/oggparsevorbis.c
> 
> Modified: trunk/libavformat/oggparsevorbis.c
> ==============================================================================
> --- trunk/libavformat/oggparsevorbis.c	Wed Feb 11 23:57:10 2009	(r17163)
> +++ trunk/libavformat/oggparsevorbis.c	Thu Feb 12 00:34:57 2009	(r17164)
> @@ -81,21 +81,7 @@ vorbis_comment(AVFormatContext * as, uin
>              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);

How does this handle the "LANGUAGE" tag, a previous suggestion of mine
tried to convert the full names like "English" to the short names like
"eng" in order to match the usual behaviour of FFmpeg (and what some
(many?) applications expect).
It might make sense to do a best-effort approach of converting language
names to language ids.

Greetings,
Reimar D?ffinger




More information about the ffmpeg-cvslog mailing list