[FFmpeg-cvslog] matroskaenc: allow override of "writing application" tag

John Stebbins git at videolan.org
Mon Apr 21 16:42:25 CEST 2014


ffmpeg | branch: release/1.1 | John Stebbins <stebbins at jetheaddev.com> | Mon Mar  3 20:20:14 2014 +0000| [d375d6395c0a5203932d89c087f77a5757a08138] | committer: Sean McGovern

matroskaenc: allow override of "writing application" tag

Signed-off-by: Tim Walker <tdskywalker at gmail.com>

CC: libav-stable at libav.org
(cherry picked from commit 0092c1dd8dac2d9e185b58503b447a0d3fb5230d)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d375d6395c0a5203932d89c087f77a5757a08138
---

 libavformat/matroskaenc.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index b37d10c..77e11aa 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -776,7 +776,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);
@@ -936,7 +937,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);
     }
 



More information about the ffmpeg-cvslog mailing list