|
@@ -95,7 +95,9 @@ void *av_realloc(void *ptr, unsigned int size) |
|
|
{ |
|
|
{ |
|
|
#ifdef MEMALIGN_HACK |
|
|
#ifdef MEMALIGN_HACK |
|
|
//FIXME this isnt aligned correctly though it probably isnt needed |
|
|
//FIXME this isnt aligned correctly though it probably isnt needed |
|
|
int diff= ptr ? ((char*)ptr)[-1] : 0; |
|
|
|
|
|
|
|
|
int diff; |
|
|
|
|
|
if(!ptr) return av_malloc(size); |
|
|
|
|
|
diff= ((char*)ptr)[-1]; |
|
|
return realloc(ptr - diff, size + diff) + diff; |
|
|
return realloc(ptr - diff, size + diff) + diff; |
|
|
#else |
|
|
#else |
|
|
return realloc(ptr, size); |
|
|
return realloc(ptr, size); |
|
|