diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-10-08 10:58:44 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-10-08 10:58:44 +0000 |
commit | 4efe868ed86f13561428f5d67863b39bd229584c (patch) | |
tree | 469dec69c86cc8c08b61332cee50cf41fa06c602 /libvo | |
parent | 3edd4f649d8f7bb886ebfa385886058833c519e7 (diff) |
correct handling of subdevice, -fb device is obsoleted
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11056 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_fbdev.c | 24 | ||||
-rw-r--r-- | libvo/vo_fbdev2.c | 7 |
2 files changed, 19 insertions, 12 deletions
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c index 79e8fccbce..f2f7e1c3d3 100644 --- a/libvo/vo_fbdev.c +++ b/libvo/vo_fbdev.c @@ -639,14 +639,6 @@ static struct fb_cmap *make_directcolor_cmap(struct fb_var_screeninfo *var) return cmap; } -#ifdef CONFIG_VIDIX -static uint32_t parseSubDevice(const char *sd) -{ - if(memcmp(sd,"vidix",5) == 0) vidix_name = &sd[5]; /* vidix_name will be valid within init() */ - else { mp_msg(MSGT_VO, MSGL_WARN, "Unknown subdevice: '%s'\n", sd); return -1; } - return 0; -} -#endif static int fb_preinit(int reset) { @@ -1114,11 +1106,21 @@ static void uninit(void) static uint32_t preinit(const char *vo_subdevice) { pre_init_err = 0; + + if(vo_subdevice) + { #ifdef CONFIG_VIDIX - if(vo_subdevice) parseSubDevice(vo_subdevice); - if(vidix_name) pre_init_err = vidix_preinit(vidix_name,&video_out_fbdev); - mp_msg(MSGT_VO, MSGL_DBG3, "vo_subdevice: initialization returns: %i\n",pre_init_err); + if (memcmp(vo_subdevice, "vidix", 5) == 0) + vidix_name = &vo_subdevice[5]; + if(vidix_name) + pre_init_err = vidix_preinit(vidix_name,&video_out_fbdev); + else #endif + { + if (fb_dev_name) free(fb_dev_name); + fb_dev_name = strdup(vo_subdevice); + } + } if(!pre_init_err) return (pre_init_err=(fb_preinit(0)?0:-1)); return(-1); } diff --git a/libvo/vo_fbdev2.c b/libvo/vo_fbdev2.c index 40c901c77c..cf3681681e 100644 --- a/libvo/vo_fbdev2.c +++ b/libvo/vo_fbdev2.c @@ -191,8 +191,13 @@ err_out: return -1; } -static uint32_t preinit(const char *ignore) +static uint32_t preinit(const char *subdevice) { + if (subdevice) + { + if (fb_dev_name) free(fb_dev_name); + fb_dev_name = strdup(subdevice); + } return fb_preinit(0); } |