[MPlayer-cvslog] r35284 - trunk/libvo/x11_common.c

reimar subversion at mplayerhq.hu
Tue Oct 30 17:34:02 CET 2012


Author: reimar
Date: Tue Oct 30 17:34:02 2012
New Revision: 35284

Log:
Since the modecount variable is only ever initialized when the videmodes
variable is, it also has to be a global variable.

Modified:
   trunk/libvo/x11_common.c

Modified: trunk/libvo/x11_common.c
==============================================================================
--- trunk/libvo/x11_common.c	Tue Oct 30 17:30:47 2012	(r35283)
+++ trunk/libvo/x11_common.c	Tue Oct 30 17:34:02 2012	(r35284)
@@ -131,6 +131,7 @@ static int vo_old_width = 0;
 static int vo_old_height = 0;
 
 #ifdef CONFIG_XF86VM
+static int modecount;
 XF86VidModeModeInfo **vidmodes = NULL;
 XF86VidModeModeLine modeline;
 #endif
@@ -1631,8 +1632,6 @@ void vo_vm_switch(void)
     int X = vo_dwidth, Y = vo_dheight;
     int modeline_width, modeline_height;
 
-    int modecount;
-
     if (XF86VidModeQueryExtension(mDisplay, &vm_event, &vm_error))
     {
         XF86VidModeQueryVersion(mDisplay, &vm_ver, &vm_rev);
@@ -1686,7 +1685,7 @@ void vo_vm_close(void)
 {
     if (vidmodes != NULL)
     {
-        int i, modecount;
+        int i;
 
         free(vidmodes);
         vidmodes = NULL;
@@ -1706,6 +1705,7 @@ void vo_vm_close(void)
         XF86VidModeSwitchToMode(mDisplay, mScreen, vidmodes[i]);
         free(vidmodes);
         vidmodes = NULL;
+        modecount = 0;
     }
 }
 #endif


More information about the MPlayer-cvslog mailing list