summaryrefslogtreecommitdiff
path: root/libavcodec/wavpack.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2006-09-28 05:01:02 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2006-09-28 05:01:02 +0000
commit8db0c25d9582065f208d8da1ccd28fb40c4c32e7 (patch)
treeee54fd81df7207fe77331caea08fa477daa01f9c /libavcodec/wavpack.c
parentb86216de4c2e491bdd418af7b379c638d9edd234 (diff)
downloadffmpeg-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.c2
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);
}