From a9de2b598dbe13fb1e86607dffb1e090742f8330 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Wed, 22 Dec 2010 22:16:35 +0100 Subject: stagefright aacenc: Make the mem_malloc function 64-bit safe Change-Id: I720109133bf5e13388b26a3bdbd66ff1f5320b70 --- media/libstagefright/codecs/aacenc/src/memalign.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'media') diff --git a/media/libstagefright/codecs/aacenc/src/memalign.c b/media/libstagefright/codecs/aacenc/src/memalign.c index 7d20352..44dd4ba 100644 --- a/media/libstagefright/codecs/aacenc/src/memalign.c +++ b/media/libstagefright/codecs/aacenc/src/memalign.c @@ -23,6 +23,11 @@ #include "memalign.h" +#ifdef _MSC_VER +#include +#else +#include +#endif /***************************************************************************** * @@ -66,8 +71,8 @@ mem_malloc(VO_MEM_OPERATOR *pMemop, unsigned int size, unsigned char alignment, pMemop->Set(CodecID, tmp, 0, size + alignment); mem_ptr = - (unsigned char *) ((unsigned int) (tmp + alignment - 1) & - (~((unsigned int) (alignment - 1)))); + (unsigned char *) ((intptr_t) (tmp + alignment - 1) & + (~((intptr_t) (alignment - 1)))); if (mem_ptr == tmp) mem_ptr += alignment; -- cgit v1.1