summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorDeckard Autoverifier <deckard@android.com>2011-07-18 15:23:20 -0700
committerAndroid Code Review <code-review@android.com>2011-07-18 15:23:20 -0700
commitc06c3603e09a85136eb97d1d8ba1a49fcebae93b (patch)
tree57ea291bb88c589ec419f6dedc8bdd60365c0de0 /media
parent55f115a3214343c826acf27fcbc4bf2927049083 (diff)
parenta9de2b598dbe13fb1e86607dffb1e090742f8330 (diff)
downloadframeworks_base-c06c3603e09a85136eb97d1d8ba1a49fcebae93b.zip
frameworks_base-c06c3603e09a85136eb97d1d8ba1a49fcebae93b.tar.gz
frameworks_base-c06c3603e09a85136eb97d1d8ba1a49fcebae93b.tar.bz2
Merge "stagefright aacenc: Make the mem_malloc function 64-bit safe"
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/codecs/aacenc/src/memalign.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/aacenc/src/memalign.c b/media/libstagefright/codecs/aacenc/src/memalign.c
index 1818c4b..bb266dc 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 <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;