summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-04-17 02:30:00 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-04-17 02:30:00 +0000
commitea3372a256a3a66ebecb16227ce9d59074ed7a1c (patch)
tree3a659210caf319492aabaeba4ad35d8d1a4647de /libavcodec
parentb153c68b8ad93cefdc51833f2e16c18a5fb1ab90 (diff)
downloadffmpeg-ea3372a256a3a66ebecb16227ce9d59074ed7a1c.tar.gz
simplify
Originally committed as revision 12868 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/alac.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index d93dfd279d..35d6271ef4 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -184,11 +184,9 @@ static void bastardized_rice_decompress(ALACContext *alac,
int k; /* size of extra bits */
/* read k, that is bits as is */
- k = 31 - rice_kmodifier - count_leading_zeros((history >> 9) + 3);
+ k = 31 - count_leading_zeros((history >> 9) + 3);
- if (k < 0)
- k += rice_kmodifier;
- else
+ if (k >= rice_kmodifier)
k = rice_kmodifier;
if (k != 1) {