]> git.sesse.net Git - ffmpeg/commitdiff
matroskaenc: Don't write a track language tag
authorJohn Stebbins <stebbins@jetheaddev.com>
Fri, 25 Sep 2015 15:36:30 +0000 (08:36 -0700)
committerAnton Khirnov <anton@khirnov.net>
Sat, 3 Oct 2015 11:44:35 +0000 (13:44 +0200)
"language" is not an offical matroska tag.
Track languages are specified with the MATROSKA_ID_TRACKLANGUAGE ebml.
Writing the tag overrides the ebml specified language during playback with
libav and some other players.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavformat/matroskaenc.c

index db86e88557fa37a4e2dfff7c5c8879496d0f4869..2e4d277ae96e6ea81de9892e91f200980aca5963 100644 (file)
@@ -1005,7 +1005,9 @@ static int mkv_write_tag(AVFormatContext *s, AVDictionary *m, unsigned int eleme
 
     while ((t = av_dict_get(m, "", t, AV_DICT_IGNORE_SUFFIX))) {
         if (av_strcasecmp(t->key, "title") &&
-            av_strcasecmp(t->key, "encoding_tool")) {
+            av_strcasecmp(t->key, "encoding_tool") &&
+            (elementid != MATROSKA_ID_TAGTARGETS_TRACKUID ||
+             av_strcasecmp(t->key, "language"))) {
             ret = mkv_write_simpletag(s->pb, t);
             if (ret < 0)
                 return ret;