[FFmpeg-devel] [PATCH] avi metadata conv table

Michael Niedermayer michaelni
Sat Feb 6 12:18:04 CET 2010


On Sat, Feb 06, 2010 at 12:15:49PM +0100, Anton Khirnov wrote:
> On Sat, Feb 06, 2010 at 10:37:12AM +0100, Michael Niedermayer wrote:
[...]
> @@ -378,13 +372,14 @@ static int avi_write_header(AVFormatContext *s)
>  
>      list2 = ff_start_tag(pb, "LIST");
>      put_tag(pb, "INFO");
> -    avi_write_info_tag2(s, NULL, "INAM", "Title", NULL);
> -    avi_write_info_tag2(s, NULL, "IART", "Artist", "Author");
> -    avi_write_info_tag2(s, NULL, "ICOP", "Copyright", NULL);
> -    avi_write_info_tag2(s, NULL, "ICMT", "Comment", NULL);
> -    avi_write_info_tag2(s, NULL, "IPRD", "Album", NULL);
> -    avi_write_info_tag2(s, NULL, "IGNR", "Genre", NULL);
> -    avi_write_info_tag2(s, NULL, "IPRT", "Track", NULL);

> +    while ((t = av_metadata_get(s->metadata, "", t, AV_METADATA_IGNORE_SUFFIX))) {
> +        for (i = 0; *ff_avi_tags[i]; i++)
> +            if (strlen(t->key) == 4)
> +                if (AV_RB32(t->key) == AV_RB32(ff_avi_tags[i])) {
> +                    avi_write_info_tag(s->pb, t->key, t->value);
> +                    break;
> +            }
> +    }

why arent you searching for each tag from ff_avi_tags in s->metadata ?
this seems simpler to me
anyway i think your patch is ok if tested and works

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct awnser.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100206/e1331b07/attachment.pgp>



More information about the ffmpeg-devel mailing list