summaryrefslogtreecommitdiff
path: root/libavcodec/alac.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-07-09 10:57:42 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-07-19 13:26:46 -0400
commit5177413d2043109f3e689e5fbfa79411c0c8e09d (patch)
tree226f4146de0ba7e2afaa3d43107d69a4589068e8 /libavcodec/alac.c
parent7e6593e9773773b5f6ad19fe4cdb2334d492493c (diff)
alac: conditionally set sign_modifier to 1
It is already unconditionally set to 0 prior to this, so we can modify it only when needed.
Diffstat (limited to 'libavcodec/alac.c')
-rw-r--r--libavcodec/alac.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index 2aab84cd2e..0aeb4109b7 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -133,8 +133,6 @@ static void bastardized_rice_decompress(ALACContext *alac,
int k;
unsigned int block_size;
- sign_modifier = 1;
-
k = 7 - av_log2(history) + ((history + 16) >> 6 /* / 64 */);
k = FFMIN(k, alac->rice_limit);
@@ -149,8 +147,8 @@ static void bastardized_rice_decompress(ALACContext *alac,
output_count += block_size;
}
- if (block_size > 0xffff)
- sign_modifier = 0;
+ if (block_size <= 0xffff)
+ sign_modifier = 1;
history = 0;
}