[Gridflow-cvs] [svn] commit: r3815 - /trunk/format/mpeg3.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Thu Jun 5 23:50:40 EDT 2008


Author: matju
Date: Thu Jun  5 23:50:40 2008
New Revision: 3815

Log:
use NEWBUF,DELBUF

Modified:
    trunk/format/mpeg3.c

Modified: trunk/format/mpeg3.c
==============================================================================
--- trunk/format/mpeg3.c (original)
+++ trunk/format/mpeg3.c Thu Jun  5 23:50:40 2008
@@ -65,14 +65,14 @@
 	int channels = 3;
 	/* !@#$ the doc says "You must allocate 4 extra bytes in the
 	last output_row. This is scratch area for the MMX routines." */
-	uint8 * buf = new uint8[sy*sx*channels+16];
+	uint8 *buf = NEWBUF(uint8,sy*sx*channels+16);
 	uint8 *rows[sy];
 	for (int i=0; i<sy; i++) rows[i]=buf+i*sx*channels;
 	mpeg3_read_frame(mpeg,rows,0,0,sx,sy,sx,sy,MPEG3_RGB888,track);
 	GridOutlet out(this,0,new Dim(sy,sx,channels),cast);
 	int bs = out.dim->prod(1);
 	for(int y=0; y<sy; y++) out.send(bs,buf+channels*sx*y);
-	delete[] (uint8 *)buf;
+	DELBUF(buf);
 //	return INT2NUM(nframe);
 }
 



More information about the Gridflow-cvs mailing list