diff options
| author | 2012-01-25 09:01:04 -0800 | |
|---|---|---|
| committer | 2012-01-25 09:01:04 -0800 | |
| commit | 776faa56eb415d01fd8d7b2dbf38bb1c8bc7fe0d (patch) | |
| tree | dbb05b729b6784c187f4dbede0bdf0bf66027fd9 | |
| parent | 01797065ae3ed9156a87c589071b2b6d9b918fc7 (diff) | |
| parent | d452520464c5a8cdd7a8d0d09b2fdb92cea1eefb (diff) | |
am d4525204: am e2594b85: am 4cd2b343: am 98539a4e: Merge "stagefright amrwbenc: Make the mem_malloc function 64-bit safe"
* commit 'd452520464c5a8cdd7a8d0d09b2fdb92cea1eefb':
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 a29baf3830b3..3b7853f19854 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; |