Commit 6421111b authored by Marton Balint's avatar Marton Balint Committed by Michael Niedermayer

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: 's avatarMarton Balint <cus@passwd.hu>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 919791f9
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment