[MPlayer-dev-eng] Re: [PATCH] Where is "XDGAMode" defined?

Fredrik Noring noring at nocrew.org
Sat Sep 28 11:50:34 CEST 2002


lör 2002-09-28 klockan 11.27 skrev Ross Finlayson:
> Please try to get this fixed soon, because the broken patch is in the 
> latest CVS snapshot.

This patch moves the offending variable to the proper scope.

> No, not quite, because the code references the variable "vo_dga_base",
> which is defined (and initialized) only in code that's enclosed in
> #ifdef HAVE_DGA2 #endif

Previously to my patch, it was a global variable initialised by 
this function in the #else part:

  XF86DGAGetVideo (vo_dga_dpy, XDefaultScreen(vo_dga_dpy), 
		   (char **)&vo_dga_base, &vo_dga_width, &bank, &ram);

So, moving the variable outside the HAVE_DGA2 scope should be enough.

	Fredrik


Index: libvo/vo_dga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dga.c,v
retrieving revision 1.50
diff -u -r1.50 vo_dga.c
--- libvo/vo_dga.c	27 Sep 2002 20:48:06 -0000	1.50
+++ libvo/vo_dga.c	28 Sep 2002 10:12:14 -0000
@@ -724,13 +724,13 @@
   int x_off, y_off;
   int wanted_width, wanted_height;
 
+  unsigned char *vo_dga_base;
 #ifdef HAVE_DGA2
   // needed to change DGA video mode
   int modecount, mX=VO_DGA_INVALID_RES, mY=VO_DGA_INVALID_RES , mVBI=100000, mMaxY=0, i,j=0;
   int dga_modenum;
   XDGAMode   *modelines=NULL, *modeline;
   XDGADevice *dgadevice;
-  unsigned char *vo_dga_base;
 #else
 #ifdef HAVE_XF86VM
   unsigned int vm_event, vm_error;




More information about the MPlayer-dev-eng mailing list