diff --git a/libavformat/utils.c b/libavformat/utils.c index c07bae210a7eec40a33157b37836c5aa06e9d1ab..caa15abbaed1f39c1a50064d56cd088e925372cc 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3521,7 +3521,7 @@ int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type, st->disposition & (AV_DISPOSITION_HEARING_IMPAIRED | AV_DISPOSITION_VISUAL_IMPAIRED)) continue; - if (type == AVMEDIA_TYPE_AUDIO && !avctx->channels) + if (type == AVMEDIA_TYPE_AUDIO && !(avctx->channels && avctx->sample_rate)) continue; if (decoder_ret) { decoder = find_decoder(ic, st, st->codec->codec_id);