[MPlayer-dev-eng] patch for -wid parameter bug in vo_x11.c

Jouni Tulkki jitulkki at cc.hut.fi
Sun Jan 26 22:59:12 CET 2003


There is a bug in vo_x11.c related to -wid parameter. This bug is
in MPlayer 0.90rc3-2.95.4, and it also appears to be in the
latest CVS version.

The bug makes MPlayer crash when using -wid and -vo x11 parameters.
The error message is invalid attribute or something like that.

I have fixed the bug so that MPlayer no longer crashes, although
I don't understand very well why my fix works.

Here is the fix:

--- vo_x11.c.original   2003-01-26 16:37:57.000000000 +0200
+++ vo_x11.c    2003-01-26 16:39:39.000000000 +0200
@@ -298,8 +298,7 @@

     xswa.background_pixel=0;
     xswa.border_pixel=0;
-    xswa.colormap=theCmap;
-    xswamask=CWBackPixel | CWBorderPixel | CWColormap;
+    xswamask=CWBackPixel | CWBorderPixel;

 #ifdef HAVE_XF86VM
     if ( vm )
@@ -323,6 +322,8 @@
      {
       if ( vo_window == None )
        {
+        xswa.colormap=theCmap;
+        xswamask|=CWColormap;
         vo_window=XCreateWindow( mDisplay,mRootWin,
                         vo_dx,vo_dy,
                         vo_dwidth,vo_dheight,

I
Jouni Tulkki
jitulkki at cc.hut.fi






More information about the MPlayer-dev-eng mailing list