[FFmpeg-cvslog] make av_find_best_stream() ignore streams marked with AV_DISPOSITION_*_IMPAIRED

Peter Ross git
Fri Feb 11 03:52:14 CET 2011


ffmpeg | branch: master | Peter Ross <pross at xvid.org> | Thu Feb 10 17:25:40 2011 +1100| [d43d2197c2906a10627334dc1184a694a2d5d53e] | committer: Michael Niedermayer

make av_find_best_stream() ignore streams marked with AV_DISPOSITION_*_IMPAIRED

Signed-off-by: Janne Grunau <janne-ffmpeg at jannau.net>
(cherry picked from commit 52091491575f015c09a32a745de4f7f7592fe6d4)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d43d2197c2906a10627334dc1184a694a2d5d53e
---

 libavformat/utils.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index c21b922..870a287 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) {




More information about the ffmpeg-cvslog mailing list