106
static void avi_write_info_tag2(AVFormatContext *s, const char *fourcc, const char *key1, const char *key2)
108
AVMetadataTag *tag= av_metadata_get(s->metadata, key1, NULL, 0);
110
tag= av_metadata_get(s->metadata, key2, NULL, 0);
112
avi_write_info_tag(s->pb, fourcc, tag->value);
106
115
static int avi_write_counters(AVFormatContext* s, int riff_id)
108
117
ByteIOContext *pb = s->pb;
333
342
list2 = start_tag(pb, "LIST");
334
343
put_tag(pb, "INFO");
335
avi_write_info_tag(pb, "INAM", s->title);
336
avi_write_info_tag(pb, "IART", s->author);
337
avi_write_info_tag(pb, "ICOP", s->copyright);
338
avi_write_info_tag(pb, "ICMT", s->comment);
339
avi_write_info_tag(pb, "IPRD", s->album);
340
avi_write_info_tag(pb, "IGNR", s->genre);
343
snprintf(str_track, 4, "%d", s->track);
344
avi_write_info_tag(pb, "IPRT", str_track);
344
avi_write_info_tag2(s, "INAM", "Title", NULL);
345
avi_write_info_tag2(s, "IART", "Artist", "Author");
346
avi_write_info_tag2(s, "ICOP", "Copyright", NULL);
347
avi_write_info_tag2(s, "ICMT", "Comment", NULL);
348
avi_write_info_tag2(s, "IPRD", "Album", NULL);
349
avi_write_info_tag2(s, "IGNR", "Genre", NULL);
350
avi_write_info_tag2(s, "IPRT", "Track", NULL);
346
351
if(!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT))
347
352
avi_write_info_tag(pb, "ISFT", LIBAVFORMAT_IDENT);
348
353
end_tag(pb, list2);