aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-16 15:53:25 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-22 03:57:52 +0100
commit3ac5530244a87612475d420e118e832efaa50478 (patch)
treee87758882d85d7969aac6f97b103b45028258976
parente8f390160438923ae2dadfe1dc44bb3211a587ee (diff)
downloadffmpeg-3ac5530244a87612475d420e118e832efaa50478.tar.gz
avformat/matroskaenc: Don't write empty language
According to the new EBML specifications, a string element of length zero would be read as the default value by a compliant parser. Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r--libavformat/matroskaenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 233c472b8f..6c8c7130c0 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1147,7 +1147,7 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
put_ebml_string(pb, MATROSKA_ID_TRACKNAME, tag->value);
tag = av_dict_get(st->metadata, "language", NULL, 0);
put_ebml_string(pb, MATROSKA_ID_TRACKLANGUAGE,
- tag && tag->value ? tag->value : "und");
+ tag && tag->value[0] ? tag->value : "und");
// The default value for TRACKFLAGDEFAULT is 1, so add element
// if we need to clear it.