Update of /cvsroot/mplayer/main/libvo In directory mail:/var/tmp.root/cvs-serv30840 Modified Files: vo_xv.c Log Message: MPlayer being unable to display video properly on many nVidia graphics cards. One approach is to always set the XV_AUTOPAINT_COLORKEY attribute if available on the XVideo port being used. patch by Ben Liblit <liblit@eecs.berkeley.edu> Index: vo_xv.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v retrieving revision 1.125 retrieving revision 1.126 diff -u -r1.125 -r1.126 --- vo_xv.c 22 Oct 2002 16:24:26 -0000 1.125 +++ vo_xv.c 23 Oct 2002 00:36:55 -0000 1.126 @@ -765,6 +765,19 @@ return -1; } + { + int howmany, i; + const XvAttribute * const attributes = XvQueryPortAttributes(mDisplay, xv_port, &howmany); + + for (i = 0; i < howmany && attributes; i++) + if (!strcmp(attributes[i].name, "XV_AUTOPAINT_COLORKEY")) + { + const Atom autopaint = XInternAtom(mDisplay, "XV_AUTOPAINT_COLORKEY", False); + XvSetPortAttribute(mDisplay, xv_port, autopaint, 1); + break; + } + } + fo = XvListImageFormats(mDisplay, xv_port, (int*)&formats); return 0;