mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 17:32:06 +00:00
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. Originally committed as revision 17550 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
d3bcbf57a9
commit
d4f2a6250a
@ -273,7 +273,7 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, int
|
||||
|
||||
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)<<k;
|
||||
LAST_SKIP_BITS(re, gb, 32 + k - log);
|
||||
|
Loading…
Reference in New Issue
Block a user