changeset 27952:94bab93a8d17

Simplify handling of VOFLAG_MODESWITCHNG, merge assignment and declaration
author reimar
date Sun, 23 Nov 2008 12:30:39 +0000
parents 413c68dbae85
children e5918aa8557f
files libvo/vo_xv.c libvo/vo_xvmc.c
diffstat 2 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_xv.c	Sun Nov 23 12:25:41 2008 +0000
+++ b/libvo/vo_xv.c	Sun Nov 23 12:30:39 2008 +0000
@@ -171,7 +171,7 @@
     int depth;
 
 #ifdef CONFIG_XF86VM
-    int vm = 0;
+    int vm = flags & VOFLAG_MODESWITCHING;
 #endif
 
     image_height = height;
@@ -189,10 +189,6 @@
     int_pause = 0;
     visible_buf = -1;
 
-#ifdef CONFIG_XF86VM
-    if (flags & VOFLAG_MODESWITCHING)
-        vm = 1;
-#endif
     num_buffers =
         vo_doublebuffering ? (vo_directrendering ? NUM_BUFFERS : 2) : 1;
 
--- a/libvo/vo_xvmc.c	Sun Nov 23 12:25:41 2008 +0000
+++ b/libvo/vo_xvmc.c	Sun Nov 23 12:30:39 2008 +0000
@@ -460,7 +460,7 @@
 unsigned long xswamask;
 int depth;
 #ifdef CONFIG_XF86VM
-int vm=0;
+int vm = flags & VOFLAG_MODESWITCHING;
 #endif
 //end of vo_xv
 
@@ -632,10 +632,6 @@
 
 skip_surface_allocation:
 
-#ifdef CONFIG_XF86VM
-   if( flags&VOFLAG_MODESWITCHING ) vm = 1;
-#endif
-
 #ifdef CONFIG_GUI
    if(use_gui)
       guiGetEvent( guiSetShVideo,0 ); // let the GUI to setup/resize our window