diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2006-09-28 05:01:02 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2006-09-28 05:01:02 +0000 |
commit | 8db0c25d9582065f208d8da1ccd28fb40c4c32e7 (patch) | |
tree | ee54fd81df7207fe77331caea08fa477daa01f9c /libavcodec/wavpack.c | |
parent | b86216de4c2e491bdd418af7b379c638d9edd234 (diff) | |
download | ffmpeg-8db0c25d9582065f208d8da1ccd28fb40c4c32e7.tar.gz |
Handle case of get_bits(0)
Originally committed as revision 6365 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r-- | libavcodec/wavpack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 4a4a5847e9..558e57d40e 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -142,7 +142,7 @@ static always_inline int get_tail(GetBitContext *gb, int k) if(k<1 || k>65535)return 0; p = av_log2_16bit(k); e = (1 << (p + 1)) - k - 1; - res = get_bits(gb, p); + res = p ? get_bits(gb, p) : 0; if(res >= e){ res = (res<<1) - e + get_bits1(gb); } |