changeset 1362:f26d6b57e620 libavcodec

10l
author michaelni
date Sun, 13 Jul 2003 11:14:43 +0000
parents 8479b875a989
children e68194195c92
files golomb.h
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/golomb.h	Sun Jul 13 11:06:45 2003 +0000
+++ b/golomb.h	Sun Jul 13 11:14:43 2003 +0000
@@ -220,7 +220,7 @@
 
     log= av_log2(buf);
     
-    if(log > 31-12){
+    if(log > 31-11){
         buf >>= log - k;
         buf += (30-log)<<k;
         LAST_SKIP_BITS(re, gb, 32 + k - log);
@@ -385,7 +385,8 @@
     e= (i>>k) + 1;
     if(e<limit){
         put_bits(pb, e, 1);
-        put_bits(pb, k, i&((1<<k)-1));
+        if(k)
+            put_bits(pb, k, i&((1<<k)-1));
     }else{
         put_bits(pb, limit  , 1);
         put_bits(pb, esc_len, i - 1);