[Mplayer-cvslog] CVS: main/libvo vo_fbdev.c,1.84,1.85 vo_fbdev2.c,1.1,1.2

Alex Beregszaszi alex at mplayerhq.hu
Wed Oct 8 12:59:14 CEST 2003


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

Modified Files:
	vo_fbdev.c vo_fbdev2.c 
Log Message:
correct handling of subdevice, -fb device is obsoleted

Index: vo_fbdev.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_fbdev.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- vo_fbdev.c	7 Oct 2003 22:29:37 -0000	1.84
+++ vo_fbdev.c	8 Oct 2003 10:58:44 -0000	1.85
@@ -639,14 +639,6 @@
   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 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);
 }

Index: vo_fbdev2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_fbdev2.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vo_fbdev2.c	31 Aug 2003 23:00:39 -0000	1.1
+++ vo_fbdev2.c	8 Oct 2003 10:58:44 -0000	1.2
@@ -191,8 +191,13 @@
 	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);
 }
 



More information about the MPlayer-cvslog mailing list