]> git.sesse.net Git - vlc/commitdiff
inhibit: apply [22797] since it's the same main loop than screensaver.c
authorRafaël Carré <funman@videolan.org>
Mon, 22 Oct 2007 18:01:34 +0000 (18:01 +0000)
committerRafaël Carré <funman@videolan.org>
Mon, 22 Oct 2007 18:01:34 +0000 (18:01 +0000)
screensaver: removes unused variable

modules/misc/inhibit.c
modules/misc/screensaver.c

index fa374b2df18bdbb18d6396a1e1987ebf20a41733..dfede6f42a4e071a1bfac89a5fd0682e9e3651dd 100644 (file)
@@ -221,17 +221,13 @@ static int UnInhibit( intf_thread_t *p_intf )
  *****************************************************************************/
 static void Run( intf_thread_t *p_intf )
 {
+    vlc_object_lock( p_intf );
     for(;;)
     {
         input_thread_t *p_input;
-        vlc_bool_t b_quit;
 
         /* Check playing state every 30 seconds */
-        vlc_object_lock( p_intf );
-        b_quit = vlc_object_timedwait( p_intf, mdate() + 30000000 ) < 0;
-        vlc_object_unlock( p_intf );
-
-        if( b_quit )
+        if( vlc_object_timedwait( p_intf, mdate() + 30000000 ) < 0 )
             break;
 
         p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_ANYWHERE );
@@ -242,7 +238,7 @@ static void Run( intf_thread_t *p_intf )
                 if( !Inhibit( p_intf ) )
                 {
                     vlc_object_release( p_input );
-                    return;
+                    goto end;
                 }
             }
             else if( p_intf->p_sys->i_cookie )
@@ -250,7 +246,7 @@ static void Run( intf_thread_t *p_intf )
                 if( !UnInhibit( p_intf ) )
                 {
                     vlc_object_release( p_input );
-                    return;
+                    goto end;
                 }
             }
             vlc_object_release( p_input );
@@ -258,7 +254,10 @@ static void Run( intf_thread_t *p_intf )
         else if( p_intf->p_sys->i_cookie )
         {
             if( !UnInhibit( p_intf ) )
-                return;
+                goto end;
         }
     }
+
+end:
+    vlc_object_unlock( p_intf );
 }
index 14efcbffe25087cee7e1b78cabb2888f4dda19cc..8467b50dfdc933a6a5b50b57944b7675960f4d26 100644 (file)
@@ -142,7 +142,6 @@ static void Run( intf_thread_t *p_intf )
     for(;;)
     {
         vlc_object_t *p_vout;
-        vlc_bool_t b_quit;
 
         /* Check screensaver every 30 seconds */
         if( vlc_object_timedwait( p_intf, mdate() + 30000000 ) < 0 )