diff options
author | wm4 <wm4@nowhere> | 2018-04-21 13:25:32 +0200 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2018-04-29 02:21:32 +0300 |
commit | c767451796704ba1d3cd497cd0f1b983edf041dd (patch) | |
tree | 8b9023eb9342c555e633e2997540c165b5ef0c24 /demux | |
parent | 4b32d51b962bc1950a7efeacdcfce5c45716bb67 (diff) |
demux_lavf: discard "und" language tag
Going by ISO 639.2, "und" means "Undetermined". Whatever it's supposed
to mean, in practice it's user for "unset". We prefer if the language
tag remains simply unset in this case.
This removes an ugliness with mp4 in partricular, because libavformat
will export unset languages as such, which affects most mp4 files.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_lavf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index dd98fc0c8d..fb4678801a 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -727,7 +727,7 @@ static void handle_new_stream(demuxer_t *demuxer, int i) if (st->disposition & AV_DISPOSITION_DEPENDENT) sh->dependent_track = true; AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0); - if (lang && lang->value) + if (lang && lang->value && strcmp(lang->value, "und") != 0) sh->lang = talloc_strdup(sh, lang->value); sh->hls_bitrate = dict_get_decimal(st->metadata, "variant_bitrate", 0); if (!sh->title && sh->hls_bitrate > 0) |