[FFmpeg-devel] [PATCH 4/8] avcodec/ac3dec: perform crc check at careful level

Michael Niedermayer michaelni at gmx.at
Mon Oct 28 16:54:39 CET 2013


This improves error concealment by default

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavcodec/ac3dec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 1603f4f..f3842f6 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1330,7 +1330,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
             if (av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, &buf[2],
                        s->frame_size - 2)) {
                 av_log(avctx, AV_LOG_ERROR, "frame CRC mismatch\n");
-                if (avctx->err_recognition & AV_EF_EXPLODE)
+                if (avctx->err_recognition & (AV_EF_EXPLODE | AV_EF_CAREFUL))
                     return AVERROR_INVALIDDATA;
                 err = AAC_AC3_PARSE_ERROR_CRC;
             }
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list