From fc27e7272e6f1a7053812f8a15b1b7098de44c71 Mon Sep 17 00:00:00 2001
From: Jan Gerber <j@v2v.cc>
Date: Mon, 21 Jul 2014 19:39:02 +0000
Subject: [PATCH] mpegts: do not export empty language tags

Signed-off-by: Anton Khirnov <anton@khirnov.net>
---
 libavformat/mpegts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 5d8b08ce0c2..fb58e1fc70e 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1412,7 +1412,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
                 break;
             }
         }
-        if (i) {
+        if (i && language[0]) {
             language[i - 1] = 0;
             av_dict_set(&st->metadata, "language", language, 0);
         }
-- 
GitLab