diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2020-04-09 17:58:17 +0200 |
---|---|---|
committer | Ray Essick <essick@google.com> | 2021-02-14 12:21:04 -0800 |
commit | 87e01ef1e77105adda58a2a89e2179d43327266c (patch) | |
tree | f36762fd7dbf8d59f9d6772da6474ecbd2f63b4c /libSACdec/src/sac_dec.cpp | |
parent | e916be37f24a118eb0663b53794389dc83af8e8d (diff) | |
download | fdk-aac-87e01ef1e77105adda58a2a89e2179d43327266c.tar.gz fdk-aac-87e01ef1e77105adda58a2a89e2179d43327266c.tar.bz2 fdk-aac-87e01ef1e77105adda58a2a89e2179d43327266c.zip |
Check number of core channels and SAC decoder input channels to avoid a channel mismatch.
Bug: 176246647
Test: atest android.media.cts.DecoderTestAacFormat android.media.cts.DecoderTestXheAac android.media.cts.DecoderTestAacDrc
Change-Id: Ib8b6973e9c29e13b8ef33d7736be2b977928face
Diffstat (limited to 'libSACdec/src/sac_dec.cpp')
-rw-r--r-- | libSACdec/src/sac_dec.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libSACdec/src/sac_dec.cpp b/libSACdec/src/sac_dec.cpp index a7b50df..649c18d 100644 --- a/libSACdec/src/sac_dec.cpp +++ b/libSACdec/src/sac_dec.cpp @@ -1182,15 +1182,17 @@ static SACDEC_ERROR SpatialDecApplyParameterSets( self->bShareDelayWithSBR = 0; /* We got no hybrid delay */ else self->bShareDelayWithSBR = 1; - SpatialDecFeedQMF(self, qmfInDataReal, qmfInDataImag, ts_io, bypassMode, - self->qmfInputReal__FDK, self->qmfInputImag__FDK, - self->numInputChannels); + SpatialDecFeedQMF( + self, qmfInDataReal, qmfInDataImag, ts_io, bypassMode, + self->qmfInputReal__FDK, self->qmfInputImag__FDK, + (bypassMode) ? numInputChannels : self->numInputChannels); break; case INPUTMODE_TIME: self->bShareDelayWithSBR = 0; - SpatialDecQMFAnalysis(self, inData, ts_io, bypassMode, - self->qmfInputReal__FDK, self->qmfInputImag__FDK, - self->numInputChannels); + SpatialDecQMFAnalysis( + self, inData, ts_io, bypassMode, self->qmfInputReal__FDK, + self->qmfInputImag__FDK, + (bypassMode) ? numInputChannels : self->numInputChannels); break; default: break; |