Index: vo_xv.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v retrieving revision 1.144 diff -u -r1.144 vo_xv.c --- vo_xv.c 31 Aug 2003 22:27:10 -0000 1.144 +++ vo_xv.c 5 Sep 2003 23:58:27 -0000 @@ -593,14 +593,22 @@ XvPortID xv_p; int busy_ports=0; + xv_port = 0; + if(arg) { - mp_msg(MSGT_VO,MSGL_ERR,"vo_xv: Unknown subdevice: %s\n",arg); - return ENOSYS; + if ((strlen(arg) >= 6) && !strncmp(arg, "port=", 5)) + { + xv_port = atoi(arg+5); + } + else + { + mp_msg(MSGT_VO,MSGL_ERR,"vo_xv: Unknown subdevice: %s\n",arg); + return ENOSYS; + } } if (!vo_init()) return -1; - xv_port = 0; /* check for Xvideo extension */ if (Success != XvQueryExtension(mDisplay,&ver,&rel,&req,&ev,&err)){ mp_msg(MSGT_VO,MSGL_ERR,"Sorry, Xv not supported by this X11 version/driver\n"); @@ -615,6 +623,12 @@ } /* check adaptors */ + if (xv_port) + { + if (XvGrabPort(mDisplay, xv_port, CurrentTime)) + xv_port = 0; + } + for (i = 0; i < adaptors && xv_port == 0; i++){ if ((ai[i].type & XvInputMask) && (ai[i].type & XvImageMask)) { for (xv_p = ai[i].base_id; xv_p < ai[i].base_id+ai[i].num_ports; ++xv_p)