diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2012-01-24 14:26:30 -0800 |
---|---|---|
committer | android code review <noreply-gerritcodereview@google.com> | 2012-01-24 14:26:32 -0800 |
commit | ceec4ae3ba8c3c3d5e243647ad7ee2fc39c71c9c (patch) | |
tree | 0ab7debc48c0bed46932a39cd506edb4320bdd6d | |
parent | a078e9b727156c76ef864ac2d8b3f6a99df9e604 (diff) | |
parent | 417f62c84261ea17e17a011b1e9706eb997a6ba1 (diff) | |
download | frameworks_av-ceec4ae3ba8c3c3d5e243647ad7ee2fc39c71c9c.zip frameworks_av-ceec4ae3ba8c3c3d5e243647ad7ee2fc39c71c9c.tar.gz frameworks_av-ceec4ae3ba8c3c3d5e243647ad7ee2fc39c71c9c.tar.bz2 |
Merge "stagefright amrwbenc: Make the mem_malloc function 64-bit safe"
-rw-r--r-- | media/libstagefright/codecs/amrwbenc/src/mem_align.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/amrwbenc/src/mem_align.c b/media/libstagefright/codecs/amrwbenc/src/mem_align.c index a29baf3..3b7853f 100644 --- a/media/libstagefright/codecs/amrwbenc/src/mem_align.c +++ b/media/libstagefright/codecs/amrwbenc/src/mem_align.c @@ -23,6 +23,11 @@ #include "mem_align.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; |