Commit 4b3b5a23 authored by Kostya Shishkov's avatar Kostya Shishkov

Coded residual in WavPack may be > 0xFFFF

Originally committed as revision 7733 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 8cb59bce
......@@ -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){
......
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