[Mplayer-cvslog] CVS: main/libvo vo_directfb.c,1.26,1.27 vo_directfb2.c,1.11,1.12 vo_fbdev.c,1.82,1.83

Alex Beregszaszi alex at mplayerhq.hu
Fri Aug 15 15:04:56 CEST 2003


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

Modified Files:
	vo_directfb.c vo_directfb2.c vo_fbdev.c 
Log Message:
4x10l fix. Vars used by the config layer must be malloc'd (strdup) as they will be freed at exit.

Index: vo_directfb.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_directfb.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- vo_directfb.c	9 Feb 2003 20:18:23 -0000	1.26
+++ vo_directfb.c	15 Aug 2003 13:04:37 -0000	1.27
@@ -314,7 +314,7 @@
 	    (directfb_minor_version <= 9) &&
 	    (directfb_micro_version < 7)))
 	{
-    	    if (!fb_dev_name && !(fb_dev_name = getenv("FRAMEBUFFER"))) fb_dev_name = "/dev/fb0";
+    	    if (!fb_dev_name && !(fb_dev_name = getenv("FRAMEBUFFER"))) fb_dev_name = strdup("/dev/fb0");
     	    DFBCHECK (DirectFBSetOption ("fbdev",fb_dev_name));
 	}
 

Index: vo_directfb2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_directfb2.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- vo_directfb2.c	27 Apr 2003 17:24:26 -0000	1.11
+++ vo_directfb2.c	15 Aug 2003 13:04:37 -0000	1.12
@@ -297,7 +297,7 @@
    * (set options)
    */
 	
-	if (!fb_dev_name && !(fb_dev_name = getenv("FRAMEBUFFER"))) fb_dev_name = "/dev/fb0";
+	if (!fb_dev_name && !(fb_dev_name = getenv("FRAMEBUFFER"))) fb_dev_name = strdup("/dev/fb0");
     	DFBCHECK (DirectFBSetOption ("fbdev",fb_dev_name));
 	
 //	uncomment this if you do not wish to create a new vt for DirectFB

Index: vo_fbdev.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_fbdev.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- vo_fbdev.c	12 Aug 2003 08:24:24 -0000	1.82
+++ vo_fbdev.c	15 Aug 2003 13:04:37 -0000	1.83
@@ -529,7 +529,7 @@
 
 /* command line/config file options */
 char *fb_dev_name = NULL;
-char *fb_mode_cfgfile = "/etc/fb.modes";
+char *fb_mode_cfgfile = NULL;
 char *fb_mode_name = NULL;
 
 static fb_mode_t *fb_mode = NULL;
@@ -663,7 +663,7 @@
 		return fb_works;
 
 	if (!fb_dev_name && !(fb_dev_name = getenv("FRAMEBUFFER")))
-		fb_dev_name = "/dev/fb0";
+		fb_dev_name = strdup("/dev/fb0");
 	mp_msg(MSGT_VO, MSGL_V, "using %s\n", fb_dev_name);
 
 	if ((fb_dev_fd = open(fb_dev_name, O_RDWR)) == -1) {
@@ -696,6 +696,9 @@
 		}
 		fb_bpp = vo_dbpp;		
 	}
+	
+	if (!fb_mode_cfgfile)
+	    fb_mode_cfgfile = strdup("/etc/fb.modes");
 
 	fb_preinit_done = 1;
 	fb_works = 1;



More information about the MPlayer-cvslog mailing list