[vlc-devel] commit: No point in checking vlc_object_alive there ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Sep 3 21:32:11 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Sep  3 21:52:08 2008 +0300| [5f8906e3671bfc9909197b98151794242d385f79] | committer: Rémi Denis-Courmont 

No point in checking vlc_object_alive there

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5f8906e3671bfc9909197b98151794242d385f79
---

 modules/access/vcdx/intf.c |   39 ++++++++++++++-------------------------
 1 files changed, 14 insertions(+), 25 deletions(-)

diff --git a/modules/access/vcdx/intf.c b/modules/access/vcdx/intf.c
index 24527e0..38be5c7 100644
--- a/modules/access/vcdx/intf.c
+++ b/modules/access/vcdx/intf.c
@@ -298,8 +298,8 @@ RunIntf( intf_thread_t *p_intf )
         }
 
 
-      /* Wait a bit */
-      msleep( INTF_IDLE_SLEEP );
+        /* Wait a bit */
+        msleep( INTF_IDLE_SLEEP );
     }
 
     if( p_vout )
@@ -317,35 +317,24 @@ RunIntf( intf_thread_t *p_intf )
 static int InitThread( intf_thread_t * p_intf )
 {
     /* We might need some locking here */
-    if( vlc_object_alive (p_intf) )
-    {
-        input_thread_t * p_input;
+    input_thread_t * p_input;
 
-        p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_PARENT );
+    p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_PARENT );
 
-        /* Maybe the input just died */
-        if( p_input == NULL )
-        {
-            return VLC_EGENERIC;
-        }
-
-        vlc_mutex_lock( &p_intf->change_lock );
+    /* Maybe the input just died */
+    if( p_input == NULL )
+        return VLC_EGENERIC;
 
-        p_intf->p_sys->p_input     = p_input;
-        p_intf->p_sys->p_vcdplayer = NULL;
+    vlc_mutex_lock( &p_intf->change_lock );
 
-        p_intf->p_sys->b_move  = false;
-        p_intf->p_sys->b_click = false;
-        p_intf->p_sys->b_key_pressed = false;
+    p_intf->p_sys->p_input     = p_input;
+    p_intf->p_sys->p_vcdplayer = NULL;
 
-        vlc_mutex_unlock( &p_intf->change_lock );
+    p_intf->p_sys->b_move  = false;
+    p_intf->p_sys->b_click = false;
+    p_intf->p_sys->b_key_pressed = false;
 
-        return VLC_SUCCESS;
-    }
-    else
-    {
-        return VLC_EGENERIC;
-    }
+    vlc_mutex_unlock( &p_intf->change_lock );
 }
 
 /*****************************************************************************




More information about the vlc-devel mailing list