summaryrefslogtreecommitdiff
path: root/apps/codecs/libffmpegFLAC/golomb.h
diff options
context:
space:
mode:
authorBoris Gjenero <dreamlayers@rockbox.org>2009-04-10 02:15:04 +0000
committerBoris Gjenero <dreamlayers@rockbox.org>2009-04-10 02:15:04 +0000
commitcd6cbf50013aae91e937a7506d82d0ed38cecdde (patch)
tree52092ee0c5a6b24eddde97b70783561405340c4e /apps/codecs/libffmpegFLAC/golomb.h
parentb94b12cd201498d405a7b8fbe31ab799860bf2bb (diff)
Fix FS#10111 - Pops and clicks when playing 24 bit FLAC files. This fixes decoding of RICE2 entropy coding. Backported from ffmpeg.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20671 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libffmpegFLAC/golomb.h')
-rw-r--r--apps/codecs/libffmpegFLAC/golomb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/codecs/libffmpegFLAC/golomb.h b/apps/codecs/libffmpegFLAC/golomb.h
index 57e84f4e57..659ecc1579 100644
--- a/apps/codecs/libffmpegFLAC/golomb.h
+++ b/apps/codecs/libffmpegFLAC/golomb.h
@@ -63,7 +63,7 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, int
log= av_log2(buf);
- if(log > 31-11){
+ 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);