From 69d0a2922f76e4e121c9f434bdf29f55b26c0c66 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 23 Jun 2013 19:44:24 +0200 Subject: [PATCH] sonic: cleanup/simplify num_taps check Signed-off-by: Michael Niedermayer --- libavcodec/sonic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c index 716d68a88b..788bea6749 100644 --- a/libavcodec/sonic.c +++ b/libavcodec/sonic.c @@ -527,9 +527,7 @@ static av_cold int sonic_encode_init(AVCodecContext *avctx) } // max tap 2048 - if ((s->num_taps < 32) || (s->num_taps > 1024) || - ((s->num_taps>>5)<<5 != s->num_taps)) - { + if (s->num_taps < 32 || s->num_taps > 1024 || s->num_taps % 32) { av_log(avctx, AV_LOG_ERROR, "Invalid number of taps\n"); return AVERROR_INVALIDDATA; }