diff options
author | Aman Gupta <aman@tmm1.net> | 2016-10-19 11:54:47 -0700 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-10-20 14:56:00 +0200 |
commit | 768448305292f50c72533597c25992b70e8e42ac (patch) | |
tree | df6fd79f6b95be2c299843feda8a14dd9a8ff91d /demux | |
parent | a2fa0d0b68ce200598122145254f56ae1adff91e (diff) | |
download | mpv-768448305292f50c72533597c25992b70e8e42ac.tar.bz2 mpv-768448305292f50c72533597c25992b70e8e42ac.tar.xz |
demux_lavf: set title on hearing and visual impaired tracks
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_lavf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 0188801aba..7857934642 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -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); |