From 0271d6a6f3111be142456bf185e834aa5bc10309 Mon Sep 17 00:00:00 2001 From: Fraunhofer IIS FDK Date: Fri, 19 Oct 2018 16:41:01 +0200 Subject: Call QMF transposer initialization only with successful SBR processing Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I8a8626a83e1bd87b2c14fad7c90174e4172c01b6 --- libSBRdec/src/sbrdecoder.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libSBRdec/src/sbrdecoder.cpp') diff --git a/libSBRdec/src/sbrdecoder.cpp b/libSBRdec/src/sbrdecoder.cpp index e2455da..f40639b 100644 --- a/libSBRdec/src/sbrdecoder.cpp +++ b/libSBRdec/src/sbrdecoder.cpp @@ -1677,6 +1677,9 @@ static SBR_ERROR sbrDecoder_DecodeElement( /* reset */ if (hSbrHeader->status & SBRDEC_HDR_STAT_RESET) { int ch; + int applySbrProc = (hSbrHeader->syncState == SBR_ACTIVE || + (hSbrHeader->frameErrorFlag == 0 && + hSbrHeader->syncState == SBR_HEADER)); for (ch = 0; ch < numElementChannels; ch++) { SBR_ERROR errorStatusTmp = SBRDEC_OK; @@ -1688,7 +1691,9 @@ static SBR_ERROR sbrDecoder_DecodeElement( hSbrHeader->syncState = UPSAMPLING; } } - hSbrHeader->status &= ~SBRDEC_HDR_STAT_RESET; + if (applySbrProc) { + hSbrHeader->status &= ~SBRDEC_HDR_STAT_RESET; + } } /* decoding */ -- cgit v1.2.3