diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-10-23 00:36:55 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-10-23 00:36:55 +0000 |
commit | 51cb286928c43900548d8d812410506b0f4a7204 (patch) | |
tree | 6aec95f61c869648fb300a85d8ba846d646b8e89 /libvo/vo_xv.c | |
parent | 2e9bd8c28d1c41ac95ef6cd23bff6042ef760e1f (diff) |
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
Diffstat (limited to 'libvo/vo_xv.c')
-rw-r--r-- | libvo/vo_xv.c | 13 |
1 files changed, 13 insertions, 0 deletions
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; |