Commit cea9147f authored by Martin Storsjo's avatar Martin Storsjo

Make the mem_align routines 64-bit safe

parent 53ad2ee2
......@@ -23,6 +23,7 @@
#include "mem_align.h"
#include <stdint.h>
/*****************************************************************************
*
......@@ -66,8 +67,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment