[Mplayer-cvslog] CVS: main/libmpcodecs vf_scale.c,1.8,1.9

Arpi of Ize arpi at mplayerhq.hu
Tue May 7 00:50:06 CEST 2002


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

Modified Files:
	vf_scale.c 
Log Message:
w/h=0 means d_w/h instead of original

Index: vf_scale.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_scale.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- vf_scale.c	19 Apr 2002 23:29:41 -0000	1.8
+++ vf_scale.c	6 May 2002 22:50:02 -0000	1.9
@@ -82,8 +82,10 @@
     }
 
     // calculate the missing parameters:
-    if(vf->priv->w<=0) vf->priv->w=width;
-    if(vf->priv->h<=0) vf->priv->h=height;
+    if(vf->priv->w<0) vf->priv->w=width; else
+    if(vf->priv->w==0) vf->priv->w=d_width;
+    if(vf->priv->h<0) vf->priv->h=height; else
+    if(vf->priv->h==0) vf->priv->h=d_height;
     
     printf("SwScale scaling %dx%d %s to %dx%d %s  \n",
 	width,height,vo_format_name(outfmt),
@@ -103,6 +105,7 @@
 	return 0;
     }
     vf->priv->fmt=best;
+    
     return vf_next_config(vf,vf->priv->w,vf->priv->h,d_width,d_height,flags,best);
 }
 
@@ -169,7 +172,7 @@
     if(args) sscanf(args, "%d:%d",
     &vf->priv->w,
     &vf->priv->h);
-    printf("SwScale: %d x %d\n",
+    printf("SwScale: %d x %d (-1=no scaling)\n",
     vf->priv->w,
     vf->priv->h);
     return 1;




More information about the MPlayer-cvslog mailing list