Commit 04058ca6 authored by Sébastien Escudier's avatar Sébastien Escudier

vlm : call var_DelCallback after input thread is joined.

This reverts vlm callback behaviour before 67b16b1b
parent 8b2cb8f2
......@@ -544,6 +544,8 @@ VLC_API int input_vaControl( input_thread_t *, int i_query, va_list );
VLC_API int input_Control( input_thread_t *, int i_query, ... );
VLC_API void input_Close( input_thread_t * );
void input_Join( input_thread_t * );
void input_Release( input_thread_t * );
/**
* Get the input item for an input thread
......
......@@ -252,6 +252,17 @@ void input_Stop( input_thread_t *p_input, bool b_abort )
input_ControlPush( p_input, INPUT_CONTROL_SET_DIE, NULL );
}
void input_Join( input_thread_t *p_input )
{
if( p_input->p->is_running )
vlc_join( p_input->p->thread, NULL );
}
void input_Release( input_thread_t *p_input )
{
vlc_object_release( p_input );
}
/**
* Close an input
*
......@@ -259,9 +270,8 @@ void input_Stop( input_thread_t *p_input, bool b_abort )
*/
void input_Close( input_thread_t *p_input )
{
if( p_input->p->is_running )
vlc_join( p_input->p->thread, NULL );
vlc_object_release( p_input );
input_Join( p_input );
input_Release( p_input );
}
/**
......
......@@ -912,8 +912,9 @@ static void vlm_MediaInstanceDelete( vlm_t *p_vlm, int64_t id, vlm_media_instanc
if( p_input )
{
input_Stop( p_input, true );
input_Join( p_input );
var_DelCallback( p_instance->p_input, "intf-event", InputEvent, p_media );
input_Close( p_input );
input_Release( p_input );
vlm_SendEventMediaInstanceStopped( p_vlm, id, p_media->cfg.psz_name );
}
......@@ -1006,8 +1007,9 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char *
input_Stop( p_input, true );
input_Join( p_input );
var_DelCallback( p_instance->p_input, "intf-event", InputEvent, p_media );
input_Close( p_input );
input_Release( p_input );
if( !p_instance->b_sout_keep )
input_resource_TerminateSout( p_instance->p_input_resource );
......
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