diff imgconvert.c @ 64:5aa6292a1660 libavcodec

win32 fixes
author glantau
date Mon, 13 Aug 2001 21:48:05 +0000
parents 1d796bdb2c2a
children 40d8092e2ff0
line wrap: on
line diff
--- a/imgconvert.c	Mon Aug 13 21:46:21 2001 +0000
+++ b/imgconvert.c	Mon Aug 13 21:48:05 2001 +0000
@@ -16,10 +16,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
 #include "avcodec.h"
 #include "dsputil.h"
 
@@ -481,7 +477,9 @@
 {
     UINT8 *src, *ptr;
     int y, y1, i;
-    UINT8 buf[5 * width];
+    UINT8 *buf;
+
+    buf= (UINT8*) malloc(5 * width);
 
     src = src1;
     for(y=0;y<height;y+=2) {
@@ -511,6 +509,7 @@
         dst += dst_wrap;
         src += (2 + 1) * src_wrap;
     }
+    free(buf);
 }