[Mplayer-cvslog] CVS: main/libmpcodecs vf_expand.c,1.14,1.15

Michael Niedermayer michael at mplayerhq.hu
Wed Aug 21 21:12:16 CEST 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv6432

Modified Files:
	vf_expand.c 
Log Message:
allocating large enough buffer, fixes green stuff on top for encoding of height %16 != 0 videos



Index: vf_expand.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_expand.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- vf_expand.c	20 Jul 2002 16:38:31 -0000	1.14
+++ vf_expand.c	21 Aug 2002 19:12:13 -0000	1.15
@@ -18,6 +18,8 @@
 #include "../libvo/osd.h"
 #endif
 
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+
 struct vf_priv_s {
     int exp_w,exp_h;
     int exp_x,exp_y;
@@ -194,7 +196,9 @@
        (mpi->flags&(MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_ACCEPT_WIDTH)) ){
 	// try full DR !
 	vf->priv->dmpi=vf_get_image(vf->next,mpi->imgfmt,
-	    mpi->type, mpi->flags, vf->priv->exp_w, vf->priv->exp_h);
+	    mpi->type, mpi->flags, 
+            MAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x), 
+            MAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y));
 	// set up mpi as a cropped-down image of dmpi:
 	if(mpi->flags&MP_IMGFLAG_PLANAR){
 	    mpi->planes[0]=vf->priv->dmpi->planes[0]+




More information about the MPlayer-cvslog mailing list