diff options
author | Martin Storsjo <martin@martin.st> | 2011-04-05 17:33:25 +0300 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2012-01-13 21:09:06 +0200 |
commit | 132e42c04a58e623efa6cd6ca43641cd80db0f05 (patch) | |
tree | 5ba520850408752df6d0811c40d5fd9f71c61087 /media/libstagefright/codecs/aacenc/src | |
parent | b676a05348e4c516fa8b57e33b10548e6142c3f8 (diff) | |
download | frameworks_av-132e42c04a58e623efa6cd6ca43641cd80db0f05.zip frameworks_av-132e42c04a58e623efa6cd6ca43641cd80db0f05.tar.gz frameworks_av-132e42c04a58e623efa6cd6ca43641cd80db0f05.tar.bz2 |
stagefright aacenc: Zero-initialize a struct
This avoids using uninitialized data in some cases, according
to valgrind.
Change-Id: I2eb5242b93c4d83a1cf6a15f022ec9579e0742a4
Diffstat (limited to 'media/libstagefright/codecs/aacenc/src')
-rw-r--r-- | media/libstagefright/codecs/aacenc/src/adj_thr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/media/libstagefright/codecs/aacenc/src/adj_thr.c b/media/libstagefright/codecs/aacenc/src/adj_thr.c index c656f65..7a38f0b 100644 --- a/media/libstagefright/codecs/aacenc/src/adj_thr.c +++ b/media/libstagefright/codecs/aacenc/src/adj_thr.c @@ -26,6 +26,7 @@ #include "adj_thr.h" #include "qc_data.h" #include "line_pe.h" +#include <string.h> #define minSnrLimit 0x6666 /* 1 dB */ @@ -1138,6 +1139,7 @@ void AdjustThresholds(ADJ_THR_STATE *adjThrState, Word16 maxBitresBits = elBits->maxBits; Word16 sideInfoBits = (qcOE->staticBitsUsed + qcOE->ancBitsUsed); Word16 ch; + memset(&peData, 0, sizeof(peData)); prepareSfbPe(&peData, psyOutChannel, logSfbEnergy, sfbNRelevantLines, nChannels, AdjThrStateElement->peOffset); |