mirror of https://github.com/mpv-player/mpv
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:
parent
2e9bd8c28d
commit
51cb286928
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue