diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-08-15 13:04:37 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-08-15 13:04:37 +0000 |
commit | 5a13436db5ccf5730cd95c9a4198ddf6cb2799c7 (patch) | |
tree | 74fd09d02b8c7fa768e62ab1d27cc3b2be0e23e7 /libvo | |
parent | 365eb142f68adafaf9e24b615ffba2504f1e6bc0 (diff) | |
download | mpv-5a13436db5ccf5730cd95c9a4198ddf6cb2799c7.tar.bz2 mpv-5a13436db5ccf5730cd95c9a4198ddf6cb2799c7.tar.xz |
4x10l fix. Vars used by the config layer must be malloc'd (strdup) as they will be freed at exit.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10619 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_directfb.c | 2 | ||||
-rw-r--r-- | libvo/vo_directfb2.c | 2 | ||||
-rw-r--r-- | libvo/vo_fbdev.c | 7 |
3 files changed, 7 insertions, 4 deletions
diff --git a/libvo/vo_directfb.c b/libvo/vo_directfb.c index 6155ebf7b5..e9c24271b2 100644 --- a/libvo/vo_directfb.c +++ b/libvo/vo_directfb.c @@ -314,7 +314,7 @@ if (verbose) printf("DirectFB: Preinit entered\n"); (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 --git a/libvo/vo_directfb2.c b/libvo/vo_directfb2.c index f5b0cb5621..da07a8b81e 100644 --- a/libvo/vo_directfb2.c +++ b/libvo/vo_directfb2.c @@ -297,7 +297,7 @@ static uint32_t preinit(const char *arg) * (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 --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c index 6419450784..be694b91fd 100644 --- a/libvo/vo_fbdev.c +++ b/libvo/vo_fbdev.c @@ -529,7 +529,7 @@ static void fb_mode2fb_vinfo(fb_mode_t *m, struct fb_var_screeninfo *v) /* 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 @@ static int fb_preinit(int reset) 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 @@ static int fb_preinit(int reset) } fb_bpp = vo_dbpp; } + + if (!fb_mode_cfgfile) + fb_mode_cfgfile = strdup("/etc/fb.modes"); fb_preinit_done = 1; fb_works = 1; |