diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-01-16 00:36:27 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-01-16 00:36:27 +0100 |
commit | cb36e441de47a710b3868f5072065d31eea2fe68 (patch) | |
tree | aa88dbfa4538c00e44a379336f7f8d4b78701db7 /libavformat | |
parent | 11329370770e5c982deece7d4eb4f2e95e725332 (diff) | |
download | ffmpeg-cb36e441de47a710b3868f5072065d31eea2fe68.tar.gz |
Never favour an audio stream with 0 channels in av_find_best_stream().
Fixes ticket #3311.
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 3f4446deaf..c53051155d 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3263,6 +3263,8 @@ int av_find_best_stream(AVFormatContext *ic, continue; if (st->disposition & (AV_DISPOSITION_HEARING_IMPAIRED|AV_DISPOSITION_VISUAL_IMPAIRED)) continue; + if (type == AVMEDIA_TYPE_AUDIO && !avctx->channels) + continue; if (decoder_ret) { decoder = find_decoder(ic, st, st->codec->codec_id); if (!decoder) { |