aboutsummaryrefslogtreecommitdiffstats
path: root/libAACdec
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2019-02-01 07:54:00 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-02-01 07:54:00 -0800
commit169e4207a33898a3a952984f1776c936e44bc552 (patch)
tree0af9e27b6c87a10f8dfabcdfa6de463cc84c921b /libAACdec
parent6a39cdb6eef730d848a9f0a15d7506bc9c00ef78 (diff)
parent6ff2d3cf8efdc5c436d6a20d065063d50fd4ec09 (diff)
downloadfdk-aac-169e4207a33898a3a952984f1776c936e44bc552.tar.gz
fdk-aac-169e4207a33898a3a952984f1776c936e44bc552.tar.bz2
fdk-aac-169e4207a33898a3a952984f1776c936e44bc552.zip
Merge "Add QMF analysis band sanity check" am: b30e02cfd3 am: db4a1deb28
am: 6ff2d3cf8e Change-Id: I12bc58a0ed01daba0295a4a8feab853b6cc3f0f0
Diffstat (limited to 'libAACdec')
-rw-r--r--libAACdec/src/aacdecoder_lib.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/libAACdec/src/aacdecoder_lib.cpp b/libAACdec/src/aacdecoder_lib.cpp
index cbcd404..c214ba1 100644
--- a/libAACdec/src/aacdecoder_lib.cpp
+++ b/libAACdec/src/aacdecoder_lib.cpp
@@ -1398,9 +1398,13 @@ aacDecoder_DecodeFrame(HANDLE_AACDECODER self, INT_PCM *pTimeData_extern,
mpegSurroundDecoder_ConfigureQmfDomain(
(CMpegSurroundDecoder *)self->pMpegSurroundDecoder, sac_interface,
(UINT)self->streamInfo.aacSampleRate, self->streamInfo.aot);
- self->qmfDomain.globalConf.nQmfTimeSlots_requested =
- self->streamInfo.aacSamplesPerFrame /
- self->qmfDomain.globalConf.nBandsAnalysis_requested;
+ if (self->qmfDomain.globalConf.nBandsAnalysis_requested > 0) {
+ self->qmfDomain.globalConf.nQmfTimeSlots_requested =
+ self->streamInfo.aacSamplesPerFrame /
+ self->qmfDomain.globalConf.nBandsAnalysis_requested;
+ } else {
+ self->qmfDomain.globalConf.nQmfTimeSlots_requested = 0;
+ }
}
self->qmfDomain.globalConf.TDinput = pTimeData;