diff mbox series

[FFmpeg-devel,6/8] avcodec/metasound: Remove always-false checks

Message ID AS8P250MB074409BA9530E98F91ABB7748F289@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 1490ba6f4167f9d83a5f3a33ff44772572bce2cf
Headers show
Series [FFmpeg-devel,1/8] avformat/mj2kdec: Remove always-true #if CONFIG_MJPEG_2000_DEMUXER | expand

Commit Message

Andreas Rheinhardt Oct. 18, 2022, 1:31 p.m. UTC
The number of channels that is checked here is automatically
valid because it has just been set by us (based upon an entry
in codec_props).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/metasound.c | 5 -----
 1 file changed, 5 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/metasound.c b/libavcodec/metasound.c
index c81337645c..6c4525c910 100644
--- a/libavcodec/metasound.c
+++ b/libavcodec/metasound.c
@@ -302,11 +302,6 @@  static av_cold int metasound_decode_init(AVCodecContext *avctx)
         props++;
     }
 
-    if (channels <= 0 || channels > TWINVQ_CHANNELS_MAX) {
-        av_log(avctx, AV_LOG_ERROR, "Unsupported number of channels: %i\n",
-               channels);
-        return AVERROR_INVALIDDATA;
-    }
     av_channel_layout_uninit(&avctx->ch_layout);
     av_channel_layout_default(&avctx->ch_layout, channels);