[FFmpeg-cvslog] sonic: cleanup/simplify num_taps check
Michael Niedermayer
git at videolan.org
Sun Jun 23 20:27:51 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun 23 19:44:24 2013 +0200| [69d0a2922f76e4e121c9f434bdf29f55b26c0c66] | committer: Michael Niedermayer
sonic: cleanup/simplify num_taps check
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=69d0a2922f76e4e121c9f434bdf29f55b26c0c66
---
libavcodec/sonic.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index 716d68a..788bea6 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;
}
More information about the ffmpeg-cvslog
mailing list