[MPlayer-dev-eng] [PATCH] -vo xv:port=

Jim Hawkins mplayer at jawkins.com
Sun Sep 7 15:44:32 CEST 2003


Hi,

For some reason vo xv decides the supplied port is invalid if it's greater
than the number of adaptors, which, on my system, it always is. Patch
attached to remove this incorrect assertion.

Jim
-------------- next part --------------
Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.146
diff -u -r1.146 vo_xv.c
--- vo_xv.c	6 Sep 2003 22:42:02 -0000	1.146
+++ vo_xv.c	7 Sep 2003 13:45:59 -0000
@@ -623,15 +623,12 @@
     }
 
    /* check adaptors */
-    if(xv_port >= adaptors || xv_port < 0)
-    {
-    	mp_msg(MSGT_VO, MSGL_WARN,"Xv: Invalid port parameter, overriding with port 0\n");
-    	xv_port = 0;
-    }
     if (xv_port)
     {
-      if (XvGrabPort(mDisplay, xv_port, CurrentTime))
+      if (XvGrabPort(mDisplay, xv_port, CurrentTime)) {
+        mp_msg(MSGT_VO, MSGL_WARN,"Xv: Port %i inaccessible, searching for free port instead\n", xv_port);
         xv_port = 0;
+      }
     }
    
     for (i = 0; i < adaptors && xv_port == 0; i++){


More information about the MPlayer-dev-eng mailing list