From: Sébastien Escudier Date: Mon, 17 Aug 2009 14:38:56 +0000 (+0200) Subject: VLM : move input event callback deletion. In order to receive all inputs events it... X-Git-Tag: 1.1.0-ff~3958 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=5604a58909270997980eb0d815e5057abab2cf18;p=vlc VLM : move input event callback deletion. In order to receive all inputs events it's better to delete callbacks just before releasing the object. Signed-off-by: Rémi Denis-Courmont --- diff --git a/src/input/vlm.c b/src/input/vlm.c index 42fbe5ba32..716bc7d083 100644 --- a/src/input/vlm.c +++ b/src/input/vlm.c @@ -805,11 +805,11 @@ static void vlm_MediaInstanceDelete( vlm_t *p_vlm, int64_t id, vlm_media_instanc input_Stop( p_input, true ); vlc_thread_join( p_input ); - var_DelCallback( p_instance->p_input, "intf-event", InputEvent, p_media ); p_resource = input_DetachResource( p_input ); input_resource_Delete( p_resource ); + var_DelCallback( p_instance->p_input, "intf-event", InputEvent, p_media ); vlc_object_release( p_input ); vlm_SendEventMediaInstanceStopped( p_vlm, id, p_media->cfg.psz_name ); @@ -889,10 +889,10 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char * input_Stop( p_input, !p_input->b_eof && !p_input->b_error ); vlc_thread_join( p_input ); - var_DelCallback( p_instance->p_input, "intf-event", InputEvent, p_media ); p_instance->p_input_resource = input_DetachResource( p_input ); + var_DelCallback( p_instance->p_input, "intf-event", InputEvent, p_media ); vlc_object_release( p_input ); if( !p_instance->b_sout_keep )