[FFmpeg-cvslog] Never favour an audio stream with 0 channels in av_find_best_stream().
Carl Eugen Hoyos
git at videolan.org
Thu Jan 16 02:15:03 CET 2014
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Thu Jan 16 00:36:27 2014 +0100| [cb36e441de47a710b3868f5072065d31eea2fe68] | committer: Carl Eugen Hoyos
Never favour an audio stream with 0 channels in av_find_best_stream().
Fixes ticket #3311.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cb36e441de47a710b3868f5072065d31eea2fe68
---
libavformat/utils.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3f4446d..c530511 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) {
More information about the ffmpeg-cvslog
mailing list