diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-01-12 11:14:12 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-01-12 11:14:12 +0000 |
commit | d5f121e2a5359b78d873ea93c3c2d689571e6a90 (patch) | |
tree | a62998b756aab16697a6896bcf610cd6c02ad261 | |
parent | 1f3f9507997830c8fc229e53dadca3ef6eb8149f (diff) | |
download | ffmpeg-d5f121e2a5359b78d873ea93c3c2d689571e6a90.tar.gz |
10l (gcc 2.95 fix)
Originally committed as revision 3827 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/mem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mem.c b/libavcodec/mem.c index 6d0fadc290..04fcd5b395 100644 --- a/libavcodec/mem.c +++ b/libavcodec/mem.c @@ -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; |