summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-16 20:07:20 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-20 02:45:10 +0100
commit77616c5fb4ee6e1223c1c4d30cc76412a9e7e9d0 (patch)
treed071d428c6208c2c29e01fa9b50ab0f5edd22f1f /libavcodec/avcodec.c
parent746796ceb49b3dab88d3c05f26c2406eceadf4ed (diff)
avcodec/avcodec: Move decoder channel count check to ff_decode_preinit
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/avcodec.c')
-rw-r--r--libavcodec/avcodec.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index b3940b97e0..2f3896dcc4 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -270,14 +270,6 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
ret = AVERROR(EINVAL);
goto free_and_end;
}
- if (av_codec_is_decoder(codec) &&
- codec->type == AVMEDIA_TYPE_AUDIO &&
- !(codec->capabilities & AV_CODEC_CAP_CHANNEL_CONF) &&
- avctx->channels == 0) {
- av_log(avctx, AV_LOG_ERROR, "Decoder requires channel count but channels not set\n");
- ret = AVERROR(EINVAL);
- goto free_and_end;
- }
if (avctx->sample_rate < 0) {
av_log(avctx, AV_LOG_ERROR, "Invalid sample rate: %d\n", avctx->sample_rate);