# HG changeset patch # User alex # Date 1060952677 0 # Node ID 7901f7d6e0ebf4ef24efc455f8423c740d3fc8fe # Parent 4b9c5abf2f60f8d0a5864ddd88436b034c3d1c1d 4x10l fix. Vars used by the config layer must be malloc'd (strdup) as they will be freed at exit. diff -r 4b9c5abf2f60 -r 7901f7d6e0eb libvo/vo_directfb.c --- a/libvo/vo_directfb.c Fri Aug 15 12:55:29 2003 +0000 +++ b/libvo/vo_directfb.c Fri Aug 15 13:04:37 2003 +0000 @@ -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)); } diff -r 4b9c5abf2f60 -r 7901f7d6e0eb libvo/vo_directfb2.c --- a/libvo/vo_directfb2.c Fri Aug 15 12:55:29 2003 +0000 +++ b/libvo/vo_directfb2.c Fri Aug 15 13:04:37 2003 +0000 @@ -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 diff -r 4b9c5abf2f60 -r 7901f7d6e0eb libvo/vo_fbdev.c --- a/libvo/vo_fbdev.c Fri Aug 15 12:55:29 2003 +0000 +++ b/libvo/vo_fbdev.c Fri Aug 15 13:04:37 2003 +0000 @@ -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;