Commit 69d0a292 authored by Michael Niedermayer's avatar Michael Niedermayer

sonic: cleanup/simplify num_taps check

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent db27dadc
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment