summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorJun Zhao <barryjzhao@tencent.com>2019-06-20 12:26:27 +0800
committerJun Zhao <barryjzhao@tencent.com>2019-07-03 10:33:31 +0800
commit9521d7dd58150b6b3604bf46643129c34647938c (patch)
treed55dfce68fb50a90ff66f201fafbe8b2e10ab7ba /libavformat
parentbd5e92ef8ad37d86091ce9d1d89c7cc0f7221ec1 (diff)
lavf/utils: Respect default disposition when select the AVStream
Respect default disposition when select the AVStream Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3d764c18d6..886cd6fd83 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -4218,7 +4218,8 @@ int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type,
continue;
}
}
- disposition = !(st->disposition & (AV_DISPOSITION_HEARING_IMPAIRED | AV_DISPOSITION_VISUAL_IMPAIRED));
+ disposition = !(st->disposition & (AV_DISPOSITION_HEARING_IMPAIRED | AV_DISPOSITION_VISUAL_IMPAIRED))
+ + !! (st->disposition & AV_DISPOSITION_DEFAULT);
count = st->codec_info_nb_frames;
bitrate = par->bit_rate;
multiframe = FFMIN(5, count);