diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-17 14:30:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-17 14:30:25 +0200 |
commit | fadfbb354b30f018338c66712bfe5a6b58970b9a (patch) | |
tree | 1dc56195c0aba61f396cb679788ced1a3229fb6f /libavformat/avienc.c | |
parent | d6e87190fd0725f3517493f67dca6f8f264bb370 (diff) | |
parent | 71e92414bfd79e56ea6fff174a665ff7b9b86e68 (diff) | |
download | ffmpeg-fadfbb354b30f018338c66712bfe5a6b58970b9a.tar.gz |
Merge commit '71e92414bfd79e56ea6fff174a665ff7b9b86e68'
* commit '71e92414bfd79e56ea6fff174a665ff7b9b86e68':
lavf: move RIFF INFO tag writing from avienc to riff
avconv: fix disabling auto mappings with -map_metadata
Conflicts:
ffmpeg_opt.c
libavformat/riff.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avienc.c')
-rw-r--r-- | libavformat/avienc.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/libavformat/avienc.c b/libavformat/avienc.c index 0352f8bd66..fe75d26991 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -106,19 +106,6 @@ static char* avi_stream2fourcc(char* tag, int index, enum AVMediaType type) return tag; } -static void avi_write_info_tag(AVIOContext *pb, const char *tag, const char *str) -{ - int len = strlen(str); - if (len > 0) { - len++; - ffio_wfourcc(pb, tag); - avio_wl32(pb, len); - avio_put_str(pb, str); - if (len & 1) - avio_w8(pb, 0); - } -} - static int avi_write_counters(AVFormatContext* s, int riff_id) { AVIOContext *pb = s->pb; @@ -304,7 +291,7 @@ static int avi_write_header(AVFormatContext *s) } ff_end_tag(pb, strf); if ((t = av_dict_get(s->streams[i]->metadata, "title", NULL, 0))) { - avi_write_info_tag(s->pb, "strn", t->value); + ff_riff_write_info_tag(s->pb, "strn", t->value); t = NULL; } } @@ -381,14 +368,7 @@ static int avi_write_header(AVFormatContext *s) 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); + ff_riff_write_info(s); /* some padding for easier tag editing */ list2 = ff_start_tag(pb, "JUNK"); |