]> git.sesse.net Git - vlc/commitdiff
input: retain the input item.
authorPierre d'Herbemont <pdherbemont@free.fr>
Sat, 29 Mar 2008 21:38:06 +0000 (22:38 +0100)
committerPierre d'Herbemont <pdherbemont@free.fr>
Sat, 29 Mar 2008 21:52:00 +0000 (22:52 +0100)
src/input/input.c
src/misc/objects.c

index ca1510e6cba745696c633a6e798e0d2c14ecbb7a..6a4d44c35c970c0dfe58f9e3eac7e3b9590af652 100644 (file)
@@ -177,6 +177,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
     p_input->i_pts_delay = 0;
 
     /* Init Input fields */
+    vlc_gc_incref( p_item ); /* Released in Destructor() */
     p_input->p->input.p_item = p_item;
     p_input->p->input.p_access = NULL;
     p_input->p->input.p_stream = NULL;
@@ -313,6 +314,8 @@ static void Destructor( input_thread_t * p_input )
             sout_DeleteInstance( priv->p_sout );
     }
 
+    vlc_gc_decref( p_input->p->input.p_item );
+
     vlc_mutex_destroy( &p_input->p->counters.counters_lock );
 
     vlc_mutex_destroy( &priv->lock_control );
index ffb3a570b830ebfde210580b99464f29a6351ab0..0bfca7c2272f6392ecb4f29cebdfee05a657e281 100644 (file)
@@ -1234,7 +1234,9 @@ void vlc_list_release( vlc_list_t *p_list )
 void __vlc_object_dump( vlc_object_t *p_this )
 {
     vlc_mutex_lock( &structure_lock );
-    PrintObject( p_this, "vlc_object_dump: " );
+    char psz_foo[2 * MAX_DUMPSTRUCTURE_DEPTH + 1];
+    psz_foo[0] = '|';
+    DumpStructure( p_this, 0, psz_foo );
     vlc_mutex_unlock( &structure_lock );
 }