1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

sonic: cleanup/simplify num_taps check

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-06-23 19:44:24 +02:00
parent db27dadcb0
commit 69d0a2922f

View File

@ -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;
}