Coded residual in WavPack may be > 0xFFFF

Originally committed as revision 7733 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Kostya Shishkov 2007-01-27 14:24:40 +00:00
parent 8cb59bce97
commit 4b3b5a2337

View 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){