aboutsummaryrefslogtreecommitdiffstats
path: root/libAACenc/src/aacEnc_ram.cpp
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2019-12-19 17:23:40 +0100
committerJean-Michel Trivi <jmtrivi@google.com>2020-02-13 14:39:47 -0800
commit7b5389e63fb048932f27f621c59005071efa3741 (patch)
treed442e4ccade7cc644369251de2902ac138572f88 /libAACenc/src/aacEnc_ram.cpp
parent925092e8fcd9f3635fdff6ff34f8a4a290916885 (diff)
downloadfdk-aac-7b5389e63fb048932f27f621c59005071efa3741.tar.gz
fdk-aac-7b5389e63fb048932f27f621c59005071efa3741.tar.bz2
fdk-aac-7b5389e63fb048932f27f621c59005071efa3741.zip
Ensure that QC_OUT_CHANNEL struct in encoder always uses aligned memory
Bug: 149489652 Test: atest android.media.cts.EncoderTest#testAACEncoders Change-Id: Ifc513ef20639f04c7252ade5519cc8e8c2fdbd50
Diffstat (limited to 'libAACenc/src/aacEnc_ram.cpp')
-rw-r--r--libAACenc/src/aacEnc_ram.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libAACenc/src/aacEnc_ram.cpp b/libAACenc/src/aacEnc_ram.cpp
index 77b1131..25e2aec 100644
--- a/libAACenc/src/aacEnc_ram.cpp
+++ b/libAACenc/src/aacEnc_ram.cpp
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten
+© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten
Forschung e.V. All rights reserved.
1. INTRODUCTION
@@ -204,5 +204,5 @@ QC_OUT_CHANNEL *GetRam_aacEnc_QCchannel(int n, UCHAR *dynamic_RAM) {
* (dynamic_RAM + P_BUF_0 + n*sizeof(QC_OUT_CHANNEL)) is sufficiently aligned,
* so the cast is safe */
return reinterpret_cast<QC_OUT_CHANNEL *>(reinterpret_cast<void *>(
- dynamic_RAM + P_BUF_0 + n * sizeof(QC_OUT_CHANNEL)));
+ dynamic_RAM + P_BUF_0 + n * ALIGN_SIZE(sizeof(QC_OUT_CHANNEL))));
}