aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-18 20:55:23 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-22 01:05:59 +0200
commit5c18934c6d8bb56e412efc5636fbc22b6c57b16d (patch)
treee47b700998a14a08c4ef7f599beb3a55945240d2
parentce6af2df617f70d6947c7936f9fb462bf5546886 (diff)
downloadffmpeg-5c18934c6d8bb56e412efc5636fbc22b6c57b16d.tar.gz
avcodec/pcm: Remove always-false check
None of the decoders here have the AV_CODEC_CAP_CHANNEL_CONF set, so that it is already checked generically that the number of channels is positive. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/pcm.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index fcb8ae1c2c..ee36a364c8 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -254,11 +254,6 @@ static av_cold int pcm_decode_init(AVCodecContext *avctx)
AVFloatDSPContext *fdsp;
int i;
- if (avctx->ch_layout.nb_channels <= 0) {
- av_log(avctx, AV_LOG_ERROR, "PCM channels out of bounds\n");
- return AVERROR(EINVAL);
- }
-
switch (avctx->codec_id) {
case AV_CODEC_ID_PCM_ALAW:
for (i = 0; i < 256; i++)