[Mplayer-cvslog] CVS: main/libvo vo_xvidix.c,1.3,1.4 vosub_vidix.c,1.6,1.7

Nick Kurshev nick at mplayer.dev.hu
Sun Jan 13 11:30:12 CET 2002


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

Modified Files:
	vo_xvidix.c vosub_vidix.c 
Log Message:
test for preinit errors and correct handling subdevice

Index: vo_xvidix.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xvidix.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vo_xvidix.c	13 Jan 2002 10:10:15 -0000	1.3
+++ vo_xvidix.c	13 Jan 2002 10:30:10 -0000	1.4
@@ -1,7 +1,7 @@
 /*
     VIDIX accelerated overlay in a X window
     
-    (C) Alex Beregszaszi
+    (C) Alex Beregszaszi & Nick Kurshev
     
     WS window manager by Pontscho/Fresh!
 
@@ -44,6 +44,7 @@
 
 /* VIDIX related stuff */
 static const char *vidix_name = (char *)(-1);
+static int pre_init_err = 0;
 
 /* Image parameters */
 static uint32_t image_width;
@@ -115,6 +116,11 @@
     XWindowAttributes attribs;
     int window_depth;
 
+    if(pre_init_err)
+    {
+	mp_msg(MSGT_VO, MSGL_INFO, "[xvidix] Quiting due preinit error\n");
+	return -1;
+    }
 //    if (title)
 //	free(title);
     title = strdup("MPlayer VIDIX X11 Overlay");
@@ -325,6 +331,10 @@
 
 static uint32_t query_format(uint32_t format)
 {
+  static int first = 1;
+  if(first)
+  {
+    first = 0;
     if (vidix_name == (char *)(-1))
     {
 	if (vo_subdevice)
@@ -337,9 +347,12 @@
     }
 
     if (vidix_preinit(vidix_name, &video_out_xvidix) != 0)
+    {
+	pre_init_err = 1;
 	return(0);
-    
-    return(vidix_query_fourcc(format));
+    }
+  }    
+  return pre_init_err ? 0 : vidix_query_fourcc(format);
 }
 
 

Index: vosub_vidix.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vosub_vidix.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vosub_vidix.c	10 Jan 2002 18:00:23 -0000	1.6
+++ vosub_vidix.c	13 Jan 2002 10:30:10 -0000	1.7
@@ -57,7 +57,7 @@
 	  return -1;
 	}
 	vidix_handler = vdlOpen("/usr/lib/mplayer/vidix/",
-				drvname ? drvname[0] == ':' ? &drvname[1] : NULL : NULL,
+				drvname ? drvname[0] == ':' ? &drvname[1] : drvname[0] ? drvname : NULL : NULL,
 				TYPE_OUTPUT,
 				verbose);
 	if(vidix_handler == NULL)




More information about the MPlayer-cvslog mailing list