Commit 7196e8d1 authored by Laurent Aimar's avatar Laurent Aimar

Improve input_Preparse clean up (memory leaks).

parent bd6df8a9
...@@ -365,14 +365,7 @@ int __input_Preparse( vlc_object_t *p_parent, input_item_t *p_item ) ...@@ -365,14 +365,7 @@ int __input_Preparse( vlc_object_t *p_parent, input_item_t *p_item )
return VLC_EGENERIC; return VLC_EGENERIC;
Init( p_input ); Init( p_input );
End( p_input );
/* Clean up master */
InputSourceClean( p_input, &p_input->p->input );
/* FIXME shouldn't we call End() to ? */
/* Unload all modules */
if( p_input->p->p_es_out ) input_EsOutDelete( p_input->p->p_es_out );
Destroy( p_input ); Destroy( p_input );
...@@ -1155,6 +1148,8 @@ static void End( input_thread_t * p_input ) ...@@ -1155,6 +1148,8 @@ static void End( input_thread_t * p_input )
if( p_input->p->p_es_out ) if( p_input->p->p_es_out )
input_EsOutDelete( p_input->p->p_es_out ); input_EsOutDelete( p_input->p->p_es_out );
if( !p_input->b_preparsing )
{
#define CL_CO( c ) stats_CounterClean( p_input->p->counters.p_##c ); p_input->p->counters.p_##c = NULL; #define CL_CO( c ) stats_CounterClean( p_input->p->counters.p_##c ); p_input->p->counters.p_##c = NULL;
if( p_input->p_libvlc->b_stats ) if( p_input->p_libvlc->b_stats )
{ {
...@@ -1203,6 +1198,7 @@ static void End( input_thread_t * p_input ) ...@@ -1203,6 +1198,7 @@ static void End( input_thread_t * p_input )
} }
} }
#undef CL_CO #undef CL_CO
}
vlc_mutex_destroy( &p_input->p->counters.counters_lock ); vlc_mutex_destroy( &p_input->p->counters.counters_lock );
......
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