lavc: change all decoders to behave consistently with AV_EF_CRCCHECK.
[ffmpeg.git] / libavcodec / alsdec.c
index d4f103bd6062bb685024c97bdcc94c1dabc1d6b2..782a1b8b80cbbaab254aa4576283320d9fd4538b 100644 (file)
@@ -1545,6 +1545,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr,
         if (ctx->cur_frame_length != sconf->frame_length &&
             ctx->crc_org != ctx->crc) {
             av_log(avctx, AV_LOG_ERROR, "CRC error.\n");
+            if (avctx->err_recognition & AV_EF_EXPLODE)
+                return AVERROR_INVALIDDATA;
         }
     }