[MPlayer-dev-eng] Patch: x11_common.c fix

Fredrik Kuivinen freku045 at student.liu.se
Tue Jan 15 21:26:02 CET 2002


Hi

Stumbled across a small bug in x11_common.c. Electric Fence does a quite good
job of detecting things like this...

/ Fredrik Kuivinen

-------------- next part --------------
Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.42
diff -u -3 -p -r1.42 x11_common.c
--- x11_common.c	6 Jan 2002 21:07:20 -0000	1.42
+++ x11_common.c	15 Jan 2002 20:31:11 -0000
@@ -207,10 +207,10 @@ int vo_init( void )
    bpp=mXImage->bits_per_pixel;
    if((vo_depthonscreen+7)/8 != (bpp+7)/8) vo_depthonscreen=bpp; // by A'rpi
    mask=mXImage->red_mask|mXImage->green_mask|mXImage->blue_mask;
-   XDestroyImage( mXImage );
    if(verbose)
      printf("vo: X11 color mask:  %X  (R:%lX G:%lX B:%lX)\n",
 	    mask,mXImage->red_mask,mXImage->green_mask,mXImage->blue_mask);
+   XDestroyImage( mXImage );
  }
  if(((vo_depthonscreen+7)/8)==2){
    if(mask==0x7FFF) vo_depthonscreen=15; else


More information about the MPlayer-dev-eng mailing list