demux_lavf: co-locate disposition checks

Signed-off-by: Aman Gupta <aman@tmm1.net>
This commit is contained in:
Aman Gupta 2018-05-18 14:01:26 -07:00
parent d828887792
commit b24bd4e570
1 changed files with 2 additions and 2 deletions

View File

@ -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);