summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2018-07-26 12:53:14 -0700
committersfan5 <sfan5@live.de>2018-08-13 19:09:44 +0200
commitd5cad856255cb0e74461f9d6613f561c6f347a0f (patch)
tree10cecc501f428b455f123b51f343d3f6beea79a3 /demux
parentc5d03d338ecd46d7170733822c37da4be027296f (diff)
downloadmpv-d5cad856255cb0e74461f9d6613f561c6f347a0f.tar.bz2
mpv-d5cad856255cb0e74461f9d6613f561c6f347a0f.tar.xz
player: expose hearing/visual impaired flags on audio tracks
Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_lavf.c4
-rw-r--r--demux/stheader.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index 83cce14bc2..01f99ae6fa 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -715,6 +715,10 @@ static void handle_new_stream(demuxer_t *demuxer, int i)
sh->forced_track = true;
if (st->disposition & AV_DISPOSITION_DEPENDENT)
sh->dependent_track = true;
+ if (st->disposition & AV_DISPOSITION_VISUAL_IMPAIRED)
+ sh->visual_impaired_track = true;
+ if (st->disposition & AV_DISPOSITION_HEARING_IMPAIRED)
+ sh->hearing_impaired_track = true;
if (st->disposition & AV_DISPOSITION_STILL_IMAGE)
sh->still_image = true;
if (priv->format_hack.use_stream_ids)
diff --git a/demux/stheader.h b/demux/stheader.h
index 63744487bf..beca0fabf7 100644
--- a/demux/stheader.h
+++ b/demux/stheader.h
@@ -46,6 +46,8 @@ struct sh_stream {
bool default_track; // container default track flag
bool forced_track; // container forced track flag
bool dependent_track; // container dependent track flag
+ bool visual_impaired_track; // container flag
+ bool hearing_impaired_track;// container flag
bool still_image; // video stream contains still images
int hls_bitrate;