summaryrefslogtreecommitdiffstats
path: root/demux/demux_lavf.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-27 22:02:24 +0200
committerwm4 <wm4@nowhere>2015-06-27 22:02:24 +0200
commit26f52c5730bbe66229e05f11be8a94a539786318 (patch)
tree0e16575b4310801e1e1a1f6dbc2d75b3abd4e5ee /demux/demux_lavf.c
parenta8711001c5c14ba6b06fddcccb46a78d815d1edf (diff)
downloadmpv-26f52c5730bbe66229e05f11be8a94a539786318.tar.bz2
mpv-26f52c5730bbe66229e05f11be8a94a539786318.tar.xz
demux: export forced flag
At least Matroska files have a "forced" flag (in addition to the "default" flag). Export this flag. Treat it almost like the default flag, but with slightly higher priority.
Diffstat (limited to 'demux/demux_lavf.c')
-rw-r--r--demux/demux_lavf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index 659452b5f1..db4c8edac9 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -636,7 +636,9 @@ static void handle_stream(demuxer_t *demuxer, int i)
sh->lav_headers = codec;
if (st->disposition & AV_DISPOSITION_DEFAULT)
- sh->default_track = 1;
+ sh->default_track = true;
+ if (st->disposition & AV_DISPOSITION_FORCED)
+ sh->forced_track = true;
if (priv->format_hack.use_stream_ids)
sh->demuxer_id = st->id;
AVDictionaryEntry *title = av_dict_get(st->metadata, "title", NULL, 0);