changeset 4053:fb4e436780fb libavcodec

handle limit>32 for set_ur_golomb_jpegls()
author kostya
date Sun, 22 Oct 2006 04:52:15 +0000
parents 6a05e683e7c4
children f20c7bb12103
files golomb.h
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/golomb.h	Sat Oct 21 22:07:01 2006 +0000
+++ b/golomb.h	Sun Oct 22 04:52:15 2006 +0000
@@ -445,6 +445,10 @@
         if(k)
             put_bits(pb, k, i&((1<<k)-1));
     }else{
+        while(limit > 31) {
+            put_bits(pb, 31, 0);
+            limit -= 31;
+        }
         put_bits(pb, limit  , 1);
         put_bits(pb, esc_len, i - 1);
     }