From 23da4cf305b9bfff07954711a8a2d9ec040865af Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Fri, 13 Apr 2012 14:15:08 +0300 Subject: avcenc: Switch malloc/free callbacks to use pointers instead of ints There is no reason for casting the pointers to ints. This fixes building the code on platforms where pointers are larger than ints, e.g. 64 bit platforms. Change-Id: I910cd207d0908287931c9a96eb270139967e029b --- media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp') diff --git a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp index c6f658d..9fedace 100644 --- a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp +++ b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp @@ -131,13 +131,13 @@ inline static void ConvertYUV420SemiPlanarToYUV420Planar( } } -static int32_t MallocWrapper( +static void* MallocWrapper( void *userData, int32_t size, int32_t attrs) { - return reinterpret_cast(malloc(size)); + return malloc(size); } -static void FreeWrapper(void *userData, int32_t ptr) { - free(reinterpret_cast(ptr)); +static void FreeWrapper(void *userData, void* ptr) { + free(ptr); } static int32_t DpbAllocWrapper(void *userData, -- cgit v1.1