From f56a08559334b7eb6b3fedbc0cc741887f6067ae Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Fri, 25 Sep 2015 08:36:30 -0700 Subject: matroskaenc: Don't write a track language tag "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 --- libavformat/matroskaenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavformat') diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index db86e88557..2e4d277ae9 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -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; -- cgit v1.2.3