Commit c05833cb authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

services_discovery: Make sure we kill also object created by the input.

This commit bother me. I don't see why we don't do it for all objects.
parent 8d4a3293
...@@ -123,9 +123,21 @@ int services_discovery_Start ( services_discovery_t * p_sd ) ...@@ -123,9 +123,21 @@ int services_discovery_Start ( services_discovery_t * p_sd )
/*********************************************************************** /***********************************************************************
* Stop * Stop
***********************************************************************/ ***********************************************************************/
static void ObjectKillChildrens( vlc_object_t *p_obj )
{
vlc_list_t *p_list;
int i;
vlc_object_kill( p_obj );
p_list = vlc_list_children( p_obj );
for( i = 0; i < p_list->i_count; i++ )
ObjectKillChildrens( p_list->p_values[i].p_object );
vlc_list_release( p_list );
}
void services_discovery_Stop ( services_discovery_t * p_sd ) void services_discovery_Stop ( services_discovery_t * p_sd )
{ {
vlc_object_kill( p_sd ); ObjectKillChildrens( p_sd );
if( p_sd->pf_run ) vlc_thread_join( p_sd ); if( p_sd->pf_run ) vlc_thread_join( p_sd );
module_Unneed( p_sd, p_sd->p_module ); module_Unneed( p_sd, p_sd->p_module );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment