Commit 67b16b1b authored by Laurent Aimar's avatar Laurent Aimar

Used input_Close() where applicable.

parent 2176bf42
......@@ -184,8 +184,7 @@ static void Close( vlc_object_t *p_this )
continue;
input_Stop( p_input, true );
vlc_thread_join( p_input );
vlc_object_release( p_input );
input_Close( p_input );
p_sd->p_sys->pp_input[i] = NULL;
}
......@@ -236,8 +235,7 @@ static void *Run( void *data )
if( p_input->b_eof || p_input->b_error )
{
input_Stop( p_input, false );
vlc_thread_join( p_input );
vlc_object_release( p_input );
input_Close( p_input );
p_sd->p_sys->pp_input[i] = NULL;
REMOVE_ELEM( p_sys->pp_input, p_sys->i_input, i );
......
......@@ -129,6 +129,7 @@ static void release_input_thread( libvlc_media_player_t *p_mi, bool b_input_abor
input_thread_t *p_input_thread = p_mi->input.p_thread;
if( !p_input_thread )
return;
p_mi->input.p_thread = NULL;
var_DelCallback( p_input_thread, "can-seek",
input_seekable_changed, p_mi );
......@@ -139,13 +140,7 @@ static void release_input_thread( libvlc_media_player_t *p_mi, bool b_input_abor
/* We owned this one */
input_Stop( p_input_thread, b_input_abort );
vlc_thread_join( p_input_thread );
assert( p_input_thread->b_dead );
p_mi->input.p_thread = NULL;
vlc_object_release( p_input_thread );
input_Close( p_input_thread );
}
/*
......
......@@ -673,8 +673,7 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media )
&preparse );
input_Stop( p_input, true );
vlc_thread_join( p_input );
vlc_object_release( p_input );
input_Close( p_input );
vlc_sem_destroy( &sem_preparse );
}
free( psz_header );
......@@ -916,10 +915,8 @@ static void vlm_MediaInstanceDelete( vlm_t *p_vlm, int64_t id, vlm_media_instanc
if( p_input )
{
input_Stop( p_input, true );
vlc_thread_join( p_input );
var_DelCallback( p_instance->p_input, "intf-event", InputEvent, p_media );
vlc_object_release( p_input );
input_Close( p_input );
vlm_SendEventMediaInstanceStopped( p_vlm, id, p_media->cfg.psz_name );
}
......@@ -1012,10 +1009,8 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char *
input_Stop( p_input, true );
vlc_thread_join( p_input );
var_DelCallback( p_instance->p_input, "intf-event", InputEvent, p_media );
vlc_object_release( p_input );
input_Close( p_input );
if( !p_instance->b_sout_keep )
input_resource_TerminateSout( p_instance->p_input_resource );
......
......@@ -481,8 +481,7 @@ static int LoopInput( playlist_t *p_playlist )
PL_LOCK;
p_sys->p_input = NULL;
vlc_thread_join( p_input );
vlc_object_release( p_input );
input_Close( p_input );
UpdateActivity( p_playlist, -DEFAULT_INPUT_ACTIVITY );
......
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