stagefright aacenc: Make the mem_malloc function 64-bit safe

Change-Id: I720109133bf5e13388b26a3bdbd66ff1f5320b70
This commit is contained in:
Martin Storsjo
2010-12-22 22:16:35 +01:00
parent bf5adfa5e5
commit a9de2b598d

View File

@@ -23,6 +23,11 @@
#include "memalign.h"
#ifdef _MSC_VER
#include <stddef.h>
#else
#include <stdint.h>
#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;