diff --git a/libavcodec/ws-snd1.c b/libavcodec/ws-snd1.c index 0459128ed3..a9f303add1 100644 --- a/libavcodec/ws-snd1.c +++ b/libavcodec/ws-snd1.c @@ -41,6 +41,11 @@ static av_cold int ws_snd_decode_init(AVCodecContext * avctx) { // WSSNDContext *c = avctx->priv_data; + if (avctx->channels != 1) { + av_log_ask_for_sample(avctx, "unsupported number of channels\n"); + return AVERROR(EINVAL); + } + avctx->sample_fmt = AV_SAMPLE_FMT_U8; return 0; }