From 51cb286928c43900548d8d812410506b0f4a7204 Mon Sep 17 00:00:00 2001 From: arpi Date: Wed, 23 Oct 2002 00:36:55 +0000 Subject: 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 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7858 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libvo') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index ae27c7097f..77d26a5761 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -765,6 +765,19 @@ static uint32_t preinit(const char *arg) 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; -- cgit v1.2.3