mirror of
https://github.com/mpv-player/mpv
synced 2025-02-28 03:10:55 +00:00
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.
This commit is contained in:
parent
4b32d51b96
commit
c767451796
@ -727,7 +727,7 @@ static void handle_new_stream(demuxer_t *demuxer, int i)
|
|||||||
if (st->disposition & AV_DISPOSITION_DEPENDENT)
|
if (st->disposition & AV_DISPOSITION_DEPENDENT)
|
||||||
sh->dependent_track = true;
|
sh->dependent_track = true;
|
||||||
AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
|
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->lang = talloc_strdup(sh, lang->value);
|
||||||
sh->hls_bitrate = dict_get_decimal(st->metadata, "variant_bitrate", 0);
|
sh->hls_bitrate = dict_get_decimal(st->metadata, "variant_bitrate", 0);
|
||||||
if (!sh->title && sh->hls_bitrate > 0)
|
if (!sh->title && sh->hls_bitrate > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user