- end_tag(pb, list1);
-
- list2 = start_tag(pb, "LIST");
- put_tag(pb, "INFO");
- avi_write_info_tag2(s, "INAM", "Title", NULL);
- avi_write_info_tag2(s, "IART", "Artist", "Author");
- avi_write_info_tag2(s, "ICOP", "Copyright", NULL);
- avi_write_info_tag2(s, "ICMT", "Comment", NULL);
- avi_write_info_tag2(s, "IPRD", "Album", NULL);
- avi_write_info_tag2(s, "IGNR", "Genre", NULL);
- avi_write_info_tag2(s, "IPRT", "Track", NULL);
- if(!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT))
- avi_write_info_tag(pb, "ISFT", LIBAVFORMAT_IDENT);
- end_tag(pb, list2);
+ ff_end_tag(pb, list1);
+
+ list2 = ff_start_tag(pb, "LIST");
+ ffio_wfourcc(pb, "INFO");
+ ff_metadata_conv(&s->metadata, ff_riff_info_conv, NULL);
+ for (i = 0; *ff_riff_tags[i]; i++) {
+ if ((t = av_dict_get(s->metadata, ff_riff_tags[i], NULL, AV_DICT_MATCH_CASE)))
+ avi_write_info_tag(s->pb, t->key, t->value);
+ }
+ ff_end_tag(pb, list2);