Commit 5bd4542d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Use input_Close() rather than vlc_object_release()

input_Create() should be matched with input_Close().
vlc_object_release() should be used only to discard extra references to
the input thread object.
parent c7734fcc
......@@ -871,7 +871,7 @@ int libvlc_media_player_play( libvlc_media_player_t *p_mi )
var_DelCallback( p_input_thread, "can-pause", input_pausable_changed, p_mi );
var_DelCallback( p_input_thread, "program-scrambled", input_scrambled_changed, p_mi );
var_DelCallback( p_input_thread, "can-seek", input_seekable_changed, p_mi );
vlc_object_release( p_input_thread );
input_Close( p_input_thread );
libvlc_printerr( "Input initialization failure" );
return -1;
}
......
......@@ -1028,7 +1028,7 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char *
if( input_Start( p_instance->p_input ) != VLC_SUCCESS )
{
var_DelCallback( p_instance->p_input, "intf-event", InputEvent, p_media );
vlc_object_release( p_instance->p_input );
input_Close( p_instance->p_input );
p_instance->p_input = NULL;
}
}
......
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