[Mplayer-cvslog] CVS: main/libvo vo_fbdev.c,1.76,1.77

Arpi of Ize arpi at mplayerhq.hu
Sun Jan 12 19:00:13 CET 2003


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

Modified Files:
	vo_fbdev.c 
Log Message:
-geometry fix (untested!)


Index: vo_fbdev.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_fbdev.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- vo_fbdev.c	3 Jan 2003 20:46:44 -0000	1.76
+++ vo_fbdev.c	12 Jan 2003 17:59:47 -0000	1.77
@@ -1039,6 +1039,13 @@
 		image_width=width;
 		image_height=height;
 	    }
+
+		if(fb_xres > image_width)
+		    x_offset = (fb_xres - image_width) / 2;
+		else x_offset = 0;
+		if(fb_yres > image_height)
+		    y_offset = (fb_yres - image_height) / 2;
+		else y_offset = 0;
 		geometry(&x_offset,&y_offset,fb_xres,fb_yres,image_width,image_height);
 
 		if(vidix_init(width,height,x_offset,y_offset,image_width,
@@ -1056,7 +1063,7 @@
 	else
 #endif
 	{
-	    int x_offset,y_offset;
+	    int x_offset=0,y_offset=0;
 	    if ((frame_buffer = (uint8_t *) mmap(0, fb_size, PROT_READ | PROT_WRITE,
 				    MAP_SHARED, fb_dev_fd, 0)) == (uint8_t *) -1) {
 		printf(FBDEV "Can't mmap %s: %s\n", fb_dev_name, strerror(errno));



More information about the MPlayer-cvslog mailing list