From 0ca9742ad246a1a0fe9835074c2f65e3de7b69dc Mon Sep 17 00:00:00 2001 From: Fraunhofer IIS FDK Date: Fri, 19 Oct 2018 16:45:56 +0200 Subject: [PATCH] Skip CRC check when flushing or concealment is applied Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I0f340eb0fe7f5ee8778a73fbe27199ba4915de70 --- libAACdec/src/aacdecoder.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libAACdec/src/aacdecoder.cpp b/libAACdec/src/aacdecoder.cpp index a529389..fffc1f0 100644 --- a/libAACdec/src/aacdecoder.cpp +++ b/libAACdec/src/aacdecoder.cpp @@ -3033,9 +3033,11 @@ LINKSPEC_CPP AAC_DECODER_ERROR CAacDecoder_DecodeFrame( aacChannels = 0; } - if (TRANSPORTDEC_OK != transportDec_CrcCheck(self->hInput)) { - ErrorStatus = AAC_DEC_CRC_ERROR; - self->frameOK = 0; + if (!(flags & (AACDEC_CONCEAL | AACDEC_FLUSH))) { + if (TRANSPORTDEC_OK != transportDec_CrcCheck(self->hInput)) { + ErrorStatus = AAC_DEC_CRC_ERROR; + self->frameOK = 0; + } } /* Ensure that in case of concealment a proper error status is set. */