summaryrefslogtreecommitdiff
path: root/libavcodec/wmalosslessdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-01-15 00:46:53 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-01-15 13:49:13 +0100
commit9d6be83085ccb1f52b923064eb93566ddbb0a1f7 (patch)
tree82d3c4f27989096e903be28a3fb59ddcaac21430 /libavcodec/wmalosslessdec.c
parent891bcc4acc93e0c5a75ab7a9da668df84a0edba7 (diff)
avcodec/wmalosslessdec: Replace negative channel check by assert
It is already checked by common code in git/master Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/wmalosslessdec.c')
-rw-r--r--libavcodec/wmalosslessdec.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 2b97c2a848..cd7469405d 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -189,11 +189,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
- if (avctx->channels < 0) {
- av_log(avctx, AV_LOG_ERROR, "invalid number of channels %d\n",
- avctx->channels);
- return AVERROR_INVALIDDATA;
- } else if (avctx->channels > WMALL_MAX_CHANNELS) {
+ av_assert0(avctx->channels >= 0);
+ if (avctx->channels > WMALL_MAX_CHANNELS) {
avpriv_request_sample(avctx,
"More than %d channels", WMALL_MAX_CHANNELS);
return AVERROR_PATCHWELCOME;