Coded residual in WavPack may be > 0xFFFF
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 27 Jan 2007 14:24:40 +0000 (14:24 +0000)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 27 Jan 2007 14:24:40 +0000 (14:24 +0000)
Originally committed as revision 7733 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/wavpack.c

index 6f5d84b..b462174 100644 (file)
@@ -141,8 +141,8 @@ static av_always_inline int get_tail(GetBitContext *gb, int k)
 {
     int p, e, res;
 
-    if(k<1 || k>65535)return 0;
-    p = av_log2_16bit(k);
+    if(k<1)return 0;
+    p = av_log2(k);
     e = (1 << (p + 1)) - k - 1;
     res = p ? get_bits(gb, p) : 0;
     if(res >= e){