aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/golomb.h
diff options
context:
space:
mode:
authorKostya Shishkov2006-10-22 04:52:15 +0000
committerKostya Shishkov2006-10-22 04:52:15 +0000
commit76aca7a8bfa4d050e1e88245bbbb324665d43691 (patch)
tree0ed8a708d0bc64f49a84d87832c89a7a052180f1 /libavcodec/golomb.h
parent5dc49706612fe923b3395a6462afa0af2da3b494 (diff)
handle limit>32 for set_ur_golomb_jpegls()
Originally committed as revision 6754 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/golomb.h')
-rw-r--r--libavcodec/golomb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h
index 9e0a50a1ce..9bf7aec466 100644
--- a/libavcodec/golomb.h
+++ b/libavcodec/golomb.h
@@ -445,6 +445,10 @@ static inline void set_ur_golomb_jpegls(PutBitContext *pb, int i, int k, int lim
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);
}