diff mbox series

[FFmpeg-devel,06/17] avcodec/dfpwmdec: Remove always-false check

Message ID GV1P250MB07373A7D970F892F9413F0E18F4A9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series [FFmpeg-devel,01/17] avcodec/avcodec: Uninitialize AVChannelLayout before overwriting it | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 18, 2022, 8:27 p.m. UTC
This decoder does not have the AV_CODEC_CAP_CHANNEL_CONF set,
so that number of channels has to be set by the user before
avcodec_open2().

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

Patch

diff --git a/libavcodec/dfpwmdec.c b/libavcodec/dfpwmdec.c
index 532a955b4c..4ddb806561 100644
--- a/libavcodec/dfpwmdec.c
+++ b/libavcodec/dfpwmdec.c
@@ -85,11 +85,6 @@  static av_cold int dfpwm_dec_init(struct AVCodecContext *ctx)
 {
     DFPWMState *state = ctx->priv_data;
 
-    if (ctx->ch_layout.nb_channels <= 0) {
-        av_log(ctx, AV_LOG_ERROR, "Invalid number of channels\n");
-        return AVERROR(EINVAL);
-    }
-
     state->fq = 0;
     state->q = 0;
     state->s = 0;