avcodec/flacdec: also do crc check when er compliant is set
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 27 Oct 2013 08:28:30 +0000 (09:28 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 27 Oct 2013 08:51:21 +0000 (09:51 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/flacdec.c

index 85f5202..9bf950a 100644 (file)
@@ -539,7 +539,7 @@ static int flac_decode_frame(AVCodecContext *avctx, void *data,
     }
     bytes_read = get_bits_count(&s->gb)/8;
 
-    if ((s->avctx->err_recognition & AV_EF_CRCCHECK) &&
+    if ((s->avctx->err_recognition & (AV_EF_CRCCHECK|AV_EF_COMPLIANT)) &&
         av_crc(av_crc_get_table(AV_CRC_16_ANSI),
                0, buf, bytes_read)) {
         av_log(s->avctx, AV_LOG_ERROR, "CRC error at PTS %"PRId64"\n", avpkt->pts);