From d5f121e2a5359b78d873ea93c3c2d689571e6a90 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Wed, 12 Jan 2005 11:14:12 +0000
Subject: [PATCH] 10l (gcc 2.95 fix)

Originally committed as revision 3827 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/mem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mem.c b/libavcodec/mem.c
index 6d0fadc2908..04fcd5b3950 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;
-- 
GitLab