From 51a50f01b598c538fc415b00f488827724f6668e Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Wed, 22 Dec 2010 22:39:18 +0100 Subject: [PATCH] stagefright aacenc: Don't address a Word32 with a Word16 pointer Currently, a pointer to a Word32 is used as a pointer to Word16, which doesn't work as intended on big endian architectures. This change needs to be analyzed and tested properly so that it doesn't cause issues with overflows in these variables. Another solution would be to change all the scf arrays to 32 bit instead. Change-Id: I53d9eb83bdaf8d3b1530eb5064dd10b08bce737a --- media/libstagefright/codecs/aacenc/src/sf_estim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/libstagefright/codecs/aacenc/src/sf_estim.c b/media/libstagefright/codecs/aacenc/src/sf_estim.c index fe401374c0221..bc320ec67df75 100644 --- a/media/libstagefright/codecs/aacenc/src/sf_estim.c +++ b/media/libstagefright/codecs/aacenc/src/sf_estim.c @@ -400,7 +400,7 @@ static void assimilateSingleScf(PSY_OUT_CHANNEL *psyOutChan, Word16 *minScfCalculated, Flag restartOnSuccess) { - Word32 sfbLast, sfbAct, sfbNext, scfAct, scfMin; + Word16 sfbLast, sfbAct, sfbNext, scfAct, scfMin; Word16 *scfLast, *scfNext; Word32 sfbPeOld, sfbPeNew; Word32 sfbDistNew;