[Mplayer-cvslog] CVS: main/libmpcodecs vf_spp.c,1.20,1.21
Ivan Kalvachev CVS
syncmail at mplayerhq.hu
Thu Jun 24 14:01:55 CEST 2004
CVS change done by Ivan Kalvachev CVS
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv22651
Modified Files:
vf_spp.c
Log Message:
Fix memory corruption, noticable at reallocate image
Index: vf_spp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_spp.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- vf_spp.c 9 Apr 2004 22:58:41 -0000 1.20
+++ vf_spp.c 24 Jun 2004 12:01:53 -0000 1.21
@@ -472,13 +472,15 @@
if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
// no DR, so get a new image! hope we'll get DR buffer:
- vf->dmpi=vf_get_image(vf->next,vf->priv->outfmt,
- MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_PREFER_ALIGNED_STRIDE,
- mpi->w,mpi->h);
- }
+ dmpi=vf_get_image(vf->next,vf->priv->outfmt,
+ MP_IMGTYPE_TEMP,
+ MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_PREFER_ALIGNED_STRIDE,
+ mpi->w,mpi->h);
+ vf_clone_mpi_attributes(dmpi, mpi);
+ }else{
+ dmpi=mpi;
+ }
- dmpi= vf->dmpi;
-
vf->priv->mpeg2= mpi->qscale_type;
if(vf->priv->log2_count || !(mpi->flags&MP_IMGFLAG_DIRECT)){
if(mpi->qscale || vf->priv->qp){
@@ -491,7 +493,6 @@
memcpy_pic(dmpi->planes[2], mpi->planes[2], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, dmpi->stride[2], mpi->stride[2]);
}
}
- vf_clone_mpi_attributes(dmpi, mpi);
#ifdef HAVE_MMX
if(gCpuCaps.hasMMX) asm volatile ("emms\n\t");
@@ -566,7 +567,7 @@
static int open(vf_instance_t *vf, char* args){
- int log2c;
+ int log2c=0;
vf->config=config;
vf->put_image=put_image;
More information about the MPlayer-cvslog
mailing list