]> git.sesse.net Git - vlc/commitdiff
input.c: fixed segfault with access_demux.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 16 Nov 2004 12:18:53 +0000 (12:18 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 16 Nov 2004 12:18:53 +0000 (12:18 +0000)
src/input/input.c

index ddf3b284a908a266c459ebe8bdf4d759c68087b7..a5b080611e2446ab2fe754bf31687312922f8f61 100644 (file)
@@ -820,7 +820,8 @@ static int Init( input_thread_t * p_input )
         vlc_meta_Delete( p_meta_tmp );
     }
 
-    if( access2_Control( p_input->input.p_access, ACCESS_GET_META, &p_meta_tmp))
+    if( !p_input->input.p_access ||
+        access2_Control( p_input->input.p_access, ACCESS_GET_META, &p_meta_tmp))
         p_meta_tmp = NULL;
 
     if( p_meta == NULL )
@@ -852,7 +853,8 @@ static int Init( input_thread_t * p_input )
             }
         }
 
-        if( !access2_Control( p_input->slave[i]->p_access,
+        if( p_input->slave[i]->p_access && 
+            !access2_Control( p_input->slave[i]->p_access,
                               ACCESS_GET_META, &p_meta_slave ) )
         {
             if( p_meta == NULL )