# HG changeset patch # User mru # Date 1235439704 0 # Node ID 97b991a32b855a070202a4b24b211aeab7a37c3c # Parent 895f99d0071881e0925a2484c9424df39b005545 Fix get_ur_golomb_jpegls() with A32_BITSTREAM_READER If k==0, log==0 can indicate that the coded value uses more than MIN_CACHE_BITS bits. With MIN_CACHE_BITS==32, the fast branch is incorrectly taken in this case unless explicitly forbidden. diff -r 895f99d00718 -r 97b991a32b85 golomb.h --- a/golomb.h Tue Feb 24 01:12:25 2009 +0000 +++ b/golomb.h Tue Feb 24 01:41:44 2009 +0000 @@ -273,7 +273,7 @@ log= av_log2(buf); - if(log - k >= 32-MIN_CACHE_BITS && 32-log < limit){ + if(log - k >= 32-MIN_CACHE_BITS+(MIN_CACHE_BITS==32) && 32-log < limit){ buf >>= log - k; buf += (30-log)<