summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2018-05-18 14:01:26 -0700
committerAman Gupta <aman@tmm1.net>2018-05-24 10:26:41 -0700
commitb24bd4e57075e116a5ce0c2d7a69f436776eae8f (patch)
treeaa8404b1f673c56fe6794fc2e5545490fac25062
parentd8288877923728dad3c5ce6c735a9b4cde4af705 (diff)
downloadmpv-b24bd4e57075e116a5ce0c2d7a69f436776eae8f.tar.bz2
mpv-b24bd4e57075e116a5ce0c2d7a69f436776eae8f.tar.xz
demux_lavf: co-locate disposition checks
Signed-off-by: Aman Gupta <aman@tmm1.net>
-rw-r--r--demux/demux_lavf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index fb4678801a..2049cf6c47 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -715,6 +715,8 @@ static void handle_new_stream(demuxer_t *demuxer, int i)
sh->default_track = true;
if (st->disposition & AV_DISPOSITION_FORCED)
sh->forced_track = true;
+ if (st->disposition & AV_DISPOSITION_DEPENDENT)
+ sh->dependent_track = true;
if (priv->format_hack.use_stream_ids)
sh->demuxer_id = st->id;
AVDictionaryEntry *title = av_dict_get(st->metadata, "title", NULL, 0);
@@ -724,8 +726,6 @@ static void handle_new_stream(demuxer_t *demuxer, int i)
sh->title = talloc_asprintf(sh, "visual impaired");
if (!sh->title && st->disposition & AV_DISPOSITION_HEARING_IMPAIRED)
sh->title = talloc_asprintf(sh, "hearing impaired");
- if (st->disposition & AV_DISPOSITION_DEPENDENT)
- sh->dependent_track = true;
AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
if (lang && lang->value && strcmp(lang->value, "und") != 0)
sh->lang = talloc_strdup(sh, lang->value);