Commit cb36e441 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

Never favour an audio stream with 0 channels in av_find_best_stream().

Fixes ticket #3311.
parent 11329370
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment