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>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7858 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-10-23 00:36:55 +00:00
parent 2e9bd8c28d
commit 51cb286928
1 changed files with 13 additions and 0 deletions

View File

@ -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;