[MPlayer-dev-eng] [PATCH] fix handling of XVideo COLORKEY attributes

Ben Liblit liblit at eecs.berkeley.edu
Thu Oct 17 07:42:58 CEST 2002


A recent thread on <mplayer-users> has revealed a flaw in MPlayer's 
management of the XVideo "XV_COLORKEY" and "XV_AUTOPAINT_COLORKEY" 
attributes.  This flaw results in MPlayer being unable to display video 
properly on many nVidia graphics cards.  The thread archive starts at 
<http://mplayerhq.hu/pipermail/mplayer-users/2002-October/022024.html>.

Thread participants have reached the conclusion that the flaw can be 
fixed in one of two possible ways.  One approach is to always set the 
XV_AUTOPAINT_COLORKEY attribute if available on the XVideo port being 
used.  The other is to set the video output window's background pixel to 
the value of XV_COLORKEY if that attribute is available.

Since I'm seeing the bug, I tried fixing it using each of these 
approaches.  Either one fixes the problem just fine.  I really don't 
know XVideo well at all, and I certainly don't know it well enough to 
decide which fix is preferable.  So I'm attaching *two* patches below. 
The first uses the XV_AUTOPAINT_COLORKEY approach, while the second uses 
the approach of changing the window background.  Again, both are tested, 
and either one fixes the bug.

If one of you developers has reason to prefer one over the other, please 
grab your favorite and check it in.

Incidentally, somebody should probably tell the SDL people about this, 
as "-vo sdl:x11" has exactly the same problem.

Thank you!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-autopaint
Type: video/mng
Size: 835 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20021016/977a81f8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-background
Type: video/mng
Size: 931 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20021016/977a81f8/attachment-0001.bin>


More information about the MPlayer-dev-eng mailing list