aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libAACenc/src/aacenc_lib.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libAACenc/src/aacenc_lib.cpp b/libAACenc/src/aacenc_lib.cpp
index b0d0454..3bfdfe8 100644
--- a/libAACenc/src/aacenc_lib.cpp
+++ b/libAACenc/src/aacenc_lib.cpp
@@ -1784,8 +1784,8 @@ AACENC_ERROR aacEncEncode(const HANDLE_AACENCODER hAacEncoder,
hAacEncoder->nSamplesRead));
INT_PCM *pIn =
hAacEncoder->inputBuffer +
- (hAacEncoder->inputBufferOffset + hAacEncoder->nSamplesRead) /
- hAacEncoder->aacConfig.nChannels;
+ hAacEncoder->inputBufferOffset / hAacEncoder->aacConfig.nChannels +
+ hAacEncoder->nSamplesRead / hAacEncoder->extParam.nChannels;
newSamples -=
(newSamples %
hAacEncoder->extParam