diff options
author | Marton Balint <cus@passwd.hu> | 2014-02-04 23:59:47 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-10 12:58:59 +0100 |
commit | 6421111b52de4442768e7ef31b4d29055f83900c (patch) | |
tree | 58523c762bbd9713cadfa1920f4c6c872065c53a /libavformat/utils.c | |
parent | 919791f99dc835f9d4f082b16f3e215ca7e06b2e (diff) | |
download | ffmpeg-6421111b52de4442768e7ef31b4d29055f83900c.tar.gz |
lavf: allow av_find_best_stream to return AV_DISPOSITION_*_IMPAIRED wanted_streams
Previously these type of streams were not returned even if wanted stream was
set to a stream of such. Now they are only skipped if they are not wanted
streams.
Fixes ffplay -sst <stream number> out.ts where stream number is a *_IMPAIRED stream.
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 2be4279b45..5cb7561a7b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3373,7 +3373,8 @@ int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type, continue; if (wanted_stream_nb >= 0 && real_stream_index != wanted_stream_nb) continue; - if (st->disposition & (AV_DISPOSITION_HEARING_IMPAIRED | + if (wanted_stream_nb != real_stream_index && + st->disposition & (AV_DISPOSITION_HEARING_IMPAIRED | AV_DISPOSITION_VISUAL_IMPAIRED)) continue; if (type == AVMEDIA_TYPE_AUDIO && !avctx->channels) |