[Mplayer-cvslog] CVS: main/libvo mga_common.c,1.24,1.25 vo_mga.c,1.28,1.29

Richard Felker CVS rfelker at mplayer.dev.hu
Fri Mar 29 06:03:28 CET 2002


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

Modified Files:
	mga_common.c vo_mga.c 
Log Message:
quick hack to make vo_mga accept multiple calls to config
someone else should probably improve on this later


Index: mga_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/mga_common.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- mga_common.c	25 Mar 2002 16:21:39 -0000	1.24
+++ mga_common.c	29 Mar 2002 05:03:25 -0000	1.25
@@ -9,7 +9,7 @@
 
 static mga_vid_config_t mga_vid_config;
 static uint8_t *vid_data, *frames[4];
-static int f;
+static int f = -1;
 
 static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
     int x,y;
@@ -334,6 +334,7 @@
 	ioctl( f,MGA_VID_OFF,0 );
 	munmap(frames[0],mga_vid_config.frame_size*mga_vid_config.num_frames);
 	close(f);
+	f = -1;
 }
 
 static uint32_t preinit(const char *arg)

Index: vo_mga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_mga.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- vo_mga.c	24 Mar 2002 20:55:06 -0000	1.28
+++ vo_mga.c	29 Mar 2002 05:03:25 -0000	1.29
@@ -62,6 +62,7 @@
 {
 char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid";
 
+	if (f >= 0) mga_uninit();
 	if(!vo_screenwidth || !vo_screenheight) {
 		int fd;
 		struct fb_var_screeninfo fbinfo;




More information about the MPlayer-cvslog mailing list