]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/fastaudio: Remove redundant % 32
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 8 Sep 2020 20:50:51 +0000 (22:50 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 10 Sep 2020 21:31:10 +0000 (23:31 +0200)
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/fastaudio.c

index de006acd9be2d7ed5e4ae4ea07d746818d1ea198..1dda310612c31bcaab2884390a44a188eaf4279d 100644 (file)
@@ -92,7 +92,7 @@ static int read_bits(int bits, int *ppos, unsigned *src)
     r = src[(pos - 1) / 32] >> (32 - pos % 32);
     *ppos = pos;
 
-    return r & ((1 << (bits % 32)) - 1);
+    return r & ((1 << bits) - 1);
 }
 
 static const uint8_t bits[8] = { 6, 6, 5, 5, 4, 0, 3, 3, };