Browse code

alac: avoid using a double-negative when checking if the frame is compressed

Justin Ruggles authored on 2012/07/10 02:05:35
Showing 1 changed files
... ...
@@ -298,7 +298,7 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
298 298
     unsigned int outputsamples;
299 299
     int hassize;
300 300
     unsigned int readsamplesize;
301
-    int isnotcompressed;
301
+    int is_compressed;
302 302
     uint8_t interlacing_shift;
303 303
     uint8_t interlacing_leftweight;
304 304
     int i, ch, ret;
... ...
@@ -320,7 +320,7 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
320 320
     alac->extra_bits = get_bits(&alac->gb, 2) << 3;
321 321
 
322 322
     /* whether the frame is compressed */
323
-    isnotcompressed = get_bits1(&alac->gb);
323
+    is_compressed = !get_bits1(&alac->gb);
324 324
 
325 325
     if (hassize) {
326 326
         /* now read the number of samples as a 32bit integer */
... ...
@@ -350,8 +350,7 @@ static int alac_decode_frame(AVCodecContext *avctx, void *data,
350 350
         return -1;
351 351
     }
352 352
 
353
-    if (!isnotcompressed) {
354
-        /* so it is compressed */
353
+    if (is_compressed) {
355 354
         int16_t predictor_coef_table[MAX_CHANNELS][32];
356 355
         int predictor_coef_num[MAX_CHANNELS];
357 356
         int prediction_type[MAX_CHANNELS];