Commit eda3758c authored by Michael Niedermayer's avatar Michael Niedermayer

ac3dec: update checked AV_EF flags.

A user who wishes to use default error concealment cannot set the
AV_EF_CRCCHECK flag because not every CRC in every format is a
reliable indicator of bitstream damage. In some formats crcrs
can be nonsensical in absence of any damage. We thus add the
AV_EF_CAREFUL flag in addition to the AV_EF_CRCCHECK flag to
allow a user to enable this reliable CRC check without having to
enable all CRC checks in all formats.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 3ba0bfe7
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment