changeset 3782:a8b80c80494b libavcodec

Handle case of get_bits(0)
author kostya
date Thu, 28 Sep 2006 05:01:02 +0000
parents 8e79b099d354
children c8f658e39da2
files wavpack.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/wavpack.c	Wed Sep 27 22:13:44 2006 +0000
+++ b/wavpack.c	Thu Sep 28 05:01:02 2006 +0000
@@ -142,7 +142,7 @@
     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);
     }