From c767451796704ba1d3cd497cd0f1b983edf041dd Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 21 Apr 2018 13:25:32 +0200 Subject: 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. --- demux/demux_lavf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demux/demux_lavf.c') 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) -- cgit v1.2.3