make av_find_best_stream() ignore streams marked with AV_DISPOSITION_*_IMPAIRED

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
oldabi
Peter Ross 14 years ago committed by Janne Grunau
parent 12c14cd4a8
commit 5209149157
  1. 2
      libavformat/utils.c

@ -2516,6 +2516,8 @@ int av_find_best_stream(AVFormatContext *ic,
continue; continue;
if (wanted_stream_nb >= 0 && stream_number++ != wanted_stream_nb) if (wanted_stream_nb >= 0 && stream_number++ != wanted_stream_nb)
continue; continue;
if (st->disposition & (AV_DISPOSITION_HEARING_IMPAIRED|AV_DISPOSITION_VISUAL_IMPAIRED))
continue;
if (decoder_ret) { if (decoder_ret) {
decoder = avcodec_find_decoder(ic->streams[i]->codec->codec_id); decoder = avcodec_find_decoder(ic->streams[i]->codec->codec_id);
if (!decoder) { if (!decoder) {

Loading…
Cancel
Save