# HG changeset patch # User arpi # Date 1035333415 0 # Node ID 3c690d2ad1ac2ddc313e40c758251c499ad942a2 # Parent ac161720f4f01d170d718546d2f0ef8566c85a20 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 diff -r ac161720f4f0 -r 3c690d2ad1ac libvo/vo_xv.c --- a/libvo/vo_xv.c Wed Oct 23 00:28:27 2002 +0000 +++ b/libvo/vo_xv.c Wed Oct 23 00:36:55 2002 +0000 @@ -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;