aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorJohn Stebbins <stebbins@jetheaddev.com>2014-03-03 20:20:14 +0000
committerReinhard Tartler <siretart@tauware.de>2014-05-31 20:05:19 -0400
commit330c18032464a4e1f3da907e54db2e69a6fbfcda (patch)
treef5d2d40677787e20394c204ffa21e53c7032c288 /libavformat
parent1dce4a031f8dca167ce5f58da066e296d0231a4a (diff)
downloadffmpeg-330c18032464a4e1f3da907e54db2e69a6fbfcda.tar.gz
matroskaenc: allow override of "writing application" tag
Signed-off-by: Tim Walker <tdskywalker@gmail.com> CC: libav-stable@libav.org (cherry picked from commit 0092c1dd8dac2d9e185b58503b447a0d3fb5230d)
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/matroskaenc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index e93dd65dff..8666bafc42 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -766,7 +766,8 @@ static int mkv_write_tag(AVFormatContext *s, AVDictionary *m, unsigned int eleme
end_ebml_master(s->pb, targets);
while ((t = av_dict_get(m, "", t, AV_DICT_IGNORE_SUFFIX)))
- if (av_strcasecmp(t->key, "title"))
+ if (av_strcasecmp(t->key, "title") &&
+ av_strcasecmp(t->key, "encoding_tool"))
mkv_write_simpletag(s->pb, t);
end_ebml_master(s->pb, tag);
@@ -926,7 +927,10 @@ static int mkv_write_header(AVFormatContext *s)
segment_uid[i] = av_lfg_get(&lfg);
put_ebml_string(pb, MATROSKA_ID_MUXINGAPP , LIBAVFORMAT_IDENT);
- put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, LIBAVFORMAT_IDENT);
+ if ((tag = av_dict_get(s->metadata, "encoding_tool", NULL, 0)))
+ put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, tag->value);
+ else
+ put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, LIBAVFORMAT_IDENT);
put_ebml_binary(pb, MATROSKA_ID_SEGMENTUID, segment_uid, 16);
}