From d43d2197c2906a10627334dc1184a694a2d5d53e Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Thu, 10 Feb 2011 17:25:40 +1100 Subject: [PATCH] make av_find_best_stream() ignore streams marked with AV_DISPOSITION_*_IMPAIRED Signed-off-by: Janne Grunau (cherry picked from commit 52091491575f015c09a32a745de4f7f7592fe6d4) --- libavformat/utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index c21b922401..870a287f17 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2516,6 +2516,8 @@ int av_find_best_stream(AVFormatContext *ic, continue; if (wanted_stream_nb >= 0 && stream_number++ != wanted_stream_nb) continue; + if (st->disposition & (AV_DISPOSITION_HEARING_IMPAIRED|AV_DISPOSITION_VISUAL_IMPAIRED)) + continue; if (decoder_ret) { decoder = avcodec_find_decoder(ic->streams[i]->codec->codec_id); if (!decoder) {