mirror of
https://github.com/mpv-player/mpv
synced 2025-01-28 18:53:02 +00:00
demux_lavf: set title on hearing and visual impaired tracks
This commit is contained in:
parent
a2fa0d0b68
commit
7684483052
@ -699,6 +699,10 @@ static void handle_new_stream(demuxer_t *demuxer, int i)
|
||||
AVDictionaryEntry *title = av_dict_get(st->metadata, "title", NULL, 0);
|
||||
if (title && title->value)
|
||||
sh->title = talloc_strdup(sh, title->value);
|
||||
if (!sh->title && st->disposition & AV_DISPOSITION_VISUAL_IMPAIRED)
|
||||
sh->title = talloc_asprintf(sh, "visual impaired");
|
||||
if (!sh->title && st->disposition & AV_DISPOSITION_HEARING_IMPAIRED)
|
||||
sh->title = talloc_asprintf(sh, "hearing impaired");
|
||||
AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
|
||||
if (lang && lang->value)
|
||||
sh->lang = talloc_strdup(sh, lang->value);
|
||||
|
Loading…
Reference in New Issue
Block a user