aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/sonic.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-23 19:44:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-23 19:44:24 +0200
commit69d0a2922f76e4e121c9f434bdf29f55b26c0c66 (patch)
treec326a69730999186f582bdf2d26b3145373ba360 /libavcodec/sonic.c
parentdb27dadcb05ad3192759d59cebdc3268ee01aa82 (diff)
downloadffmpeg-69d0a2922f76e4e121c9f434bdf29f55b26c0c66.tar.gz
sonic: cleanup/simplify num_taps check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/sonic.c')
-rw-r--r--libavcodec/sonic.c4
1 files changed, 1 insertions, 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;
}