alac: conditionally set sign_modifier to 1
authorJustin Ruggles <justin.ruggles@gmail.com>
Mon, 9 Jul 2012 14:57:42 +0000 (10:57 -0400)
committerJustin Ruggles <justin.ruggles@gmail.com>
Thu, 19 Jul 2012 17:26:46 +0000 (13:26 -0400)
It is already unconditionally set to 0 prior to this, so we can modify it
only when needed.

libavcodec/alac.c

index 2aab84c..0aeb410 100644 (file)
@@ -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;
         }