[Mplayer-cvslog] CVS: main/libvo geometry.c,1.6,1.7

JALH CVS (Mark Zealey) mark at mplayerhq.hu
Wed Jan 8 20:11:21 CET 2003


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

Modified Files:
	geometry.c 
Log Message:
Geometry fix to always initilize the variables rather than assume that the
driver has inited them. - Mark


Index: geometry.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/geometry.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- geometry.c	4 Jan 2003 13:12:13 -0000	1.6
+++ geometry.c	8 Jan 2003 19:10:53 -0000	1.7
@@ -35,21 +35,22 @@
 		   sscanf(vo_geometry, "%i%%:%i%%", &xper, &yper) != 2 &&
 		   sscanf(vo_geometry, "%i%%", &xper) != 1)
 			return geometry_error();
+        }
 
-		if(xper >= 0 && xper <= 100) xoff = (scrw - vidw) * ((float)xper / 100.0);
-		if(yper >= 0 && yper <= 100) yoff = (scrh - vidh) * ((float)yper / 100.0);
+	if(xper >= 0 && xper <= 100) xoff = (scrw - vidw) * ((float)xper / 100.0);
+	if(yper >= 0 && yper <= 100) yoff = (scrh - vidh) * ((float)yper / 100.0);
 
-		/* FIXME: better checking of bounds... */
-		if(width < 0 || width > scrw) width = vidw;
-		if(height < 0 || height > scrh) height = vidh;
-		if(xoff < 0 || xoff + vidw > scrw) xoff = 0;
-		if(yoff < 0 || yoff + vidh > scrh) yoff = 0;
+	/* FIXME: better checking of bounds... */
+	if(width < 0 || width > scrw) width = vidw;
+	if(height < 0 || height > scrh) height = vidh;
+	if(xoff < 0 || xoff + vidw > scrw) xoff = 0;
+	if(yoff < 0 || yoff + vidh > scrh) yoff = 0;
+
+	if(xpos) *xpos = xoff;
+	if(ypos) *ypos = yoff;
+	if(pwidth) *pwidth = width;
+	if(pheight) *pheight = height;
 
-		if(xpos) *xpos = xoff;
-		if(ypos) *ypos = yoff;
-		if(pwidth) *pwidth = width;
-		if(pheight) *pheight = height;
-        }
 	return 1;
 }
 



More information about the MPlayer-cvslog mailing list