]> git.sesse.net Git - vlc/blobdiff - modules/control/gestures.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / control / gestures.c
index 9e7ccba9cf3b590bc9944d2da44794c08a13d662..d81b4e9446eb9900dd601412a05d9ad504ea15ef 100644 (file)
@@ -24,8 +24,6 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>                                      /* malloc(), free() */
-#include <string.h>
 
 #include <vlc/vlc.h>
 #include <vlc_interface.h>
@@ -138,10 +136,10 @@ static input_thread_t * input_from_playlist ( playlist_t *p_playlist )
 {
     input_thread_t * p_input;
 
-    PL_LOCK; 
-    p_input = p_playlist->p_input; 
-    if( p_input ) 
-        vlc_object_yield( p_input ); 
+    PL_LOCK;
+    p_input = p_playlist->p_input;
+    if( p_input )
+        vlc_object_yield( p_input );
     PL_UNLOCK;
 
     return p_input;
@@ -166,6 +164,10 @@ static void RunIntf( intf_thread_t *p_intf )
 {
     playlist_t * p_playlist = NULL;
 
+    vlc_mutex_lock( &p_intf->change_lock );
+    p_intf->p_sys->p_vout = NULL;
+    vlc_mutex_unlock( &p_intf->change_lock );
+
     if( InitThread( p_intf ) < 0 )
     {
         msg_Err( p_intf, "can't initialize interface thread" );
@@ -227,10 +229,10 @@ static void RunIntf( intf_thread_t *p_intf )
 
                     p_input = input_from_playlist( p_playlist );
                     vlc_object_release( p_playlist );
-                    
                     if( !p_input )
                         break;
-                    
                     val.i_int = PLAYING_S;
                     if( p_input )
                     {
@@ -319,13 +321,12 @@ static void RunIntf( intf_thread_t *p_intf )
                    if( i_count <= 1 )
                    {
                        vlc_object_release( p_input );
-                       continue;
+                       break;
                    }
                    for( i = 0; i < i_count; i++ )
                    {
                        if( val.i_int == list.p_list->p_values[i].i_int )
                        {
-                           vlc_object_release( p_input );
                            break;
                        }
                    }
@@ -379,13 +380,12 @@ static void RunIntf( intf_thread_t *p_intf )
                     if( i_count <= 1 )
                     {
                         vlc_object_release( p_input );
-                        continue;
+                        break;
                     }
                     for( i = 0; i < i_count; i++ )
                     {
                         if( val.i_int == list.p_list->p_values[i].i_int )
                         {
-                            vlc_object_release( p_input );
                             break;
                         }
                     }
@@ -404,7 +404,7 @@ static void RunIntf( intf_thread_t *p_intf )
                     }
                     else
                     {
-                        var_Set( p_input, "spu-es", 
+                        var_Set( p_input, "spu-es",
                                 list.p_list->p_values[i+1] );
                         i = i + 1;
                     }
@@ -420,7 +420,7 @@ static void RunIntf( intf_thread_t *p_intf )
                 break;
             case GESTURE(DOWN,LEFT,NONE,NONE):
                 /* FIXME: Should close the vout!"*/
-                p_intf->p_libvlc->b_die = VLC_TRUE;
+                vlc_object_kill( p_intf->p_libvlc );
                 break;
             case GESTURE(DOWN,LEFT,UP,RIGHT):
             case GESTURE(UP,RIGHT,DOWN,LEFT):