[vlc-devel] commit: input: retain the input item. (Pierre d'Herbemont )
git version control
git at videolan.org
Sun Mar 30 01:36:37 CET 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Sat Mar 29 22:38:06 2008 +0100| [5b3a2948fe225056508a3420fff1da95a373e7af]
input: retain the input item.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5b3a2948fe225056508a3420fff1da95a373e7af
---
src/input/input.c | 3 +++
src/misc/objects.c | 4 +++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index ca1510e..6a4d44c 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -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 );
diff --git a/src/misc/objects.c b/src/misc/objects.c
index ffb3a57..0bfca7c 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -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 );
}
More information about the vlc-devel
mailing list