]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ac3dec.c
vda: cosmetic.
[ffmpeg] / libavcodec / ac3dec.c
index 5e8b36404b38781499158565eafa7a2698f52fa3..325d23bb3dda797c841d02e2ffd681932b322829 100644 (file)
@@ -223,7 +223,7 @@ static int ac3_parse_header(AC3DecodeContext *s)
     int i;
 
     /* read the rest of the bsi. read twice for dual mono mode. */
-    i = !(s->channel_mode);
+    i = !s->channel_mode;
     do {
         skip_bits(gbc, 5); // skip dialog normalization
         if (get_bits1(gbc))
@@ -792,7 +792,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
     }
 
     /* dynamic range */
-    i = !(s->channel_mode);
+    i = !s->channel_mode;
     do {
         if (get_bits1(gbc)) {
             s->dynamic_range[i] = ((dynamic_range_tab[get_bits(gbc, 8)] - 1.0) *
@@ -1371,7 +1371,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
         if (s->frame_size > buf_size) {
             av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
             err = AAC_AC3_PARSE_ERROR_FRAME_SIZE;
-        } else if (avctx->err_recognition & AV_EF_CRCCHECK) {
+        } else if (avctx->err_recognition & (AV_EF_CRCCHECK|AV_EF_CAREFUL)) {
             /* check for crc mismatch */
             if (av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, &buf[2],
                        s->frame_size - 2)) {