changeset 6102:896e1cd9a7fe libavcodec

only check ac3 crc if AVCodecContext.error_resilience > 0
author jbr
date Thu, 03 Jan 2008 23:05:53 +0000
parents d6c599061072
children 4d746aada17b
files ac3dec.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ac3dec.c	Thu Jan 03 22:42:37 2008 +0000
+++ b/ac3dec.c	Thu Jan 03 23:05:53 2008 +0000
@@ -1109,10 +1109,12 @@
     }
 
     /* check for crc mismatch */
+    if(avctx->error_resilience > 0) {
     if(av_crc(av_crc8005, 0, &buf[2], s->frame_size-2)) {
         av_log(avctx, AV_LOG_ERROR, "frame CRC mismatch\n");
         return -1;
     }
+    }
 
     avctx->sample_rate = s->sample_rate;
     avctx->bit_rate = s->bit_rate;