Commit 278321f6 authored by michael's avatar michael

10l (gcc 2.95 fix)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3827 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2bbeec17
......@@ -45,13 +45,13 @@
void *av_malloc(unsigned int size)
{
void *ptr;
int diff;
/* lets disallow possible ambiguous cases */
if(size > INT_MAX)
return NULL;
#ifdef MEMALIGN_HACK
int diff;
ptr = malloc(size+16+1);
diff= ((-(int)ptr - 1)&15) + 1;
ptr += diff;
......@@ -97,13 +97,13 @@ void *av_malloc(unsigned int size)
*/
void *av_realloc(void *ptr, unsigned int size)
{
int diff;
/* lets disallow possible ambiguous cases */
if(size > INT_MAX)
return NULL;
#ifdef MEMALIGN_HACK
//FIXME this isnt aligned correctly though it probably isnt needed
int diff;
if(!ptr) return av_malloc(size);
diff= ((char*)ptr)[-1];
return realloc(ptr - diff, size + diff) + diff;
......
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