Commit 5604a589 authored by Sébastien Escudier's avatar Sébastien Escudier Committed by Rémi Denis-Courmont

VLM : move input event callback deletion. In order to receive all inputs...

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: default avatarRémi Denis-Courmont <remi@remlab.net>
parent c45da03e
...@@ -805,11 +805,11 @@ static void vlm_MediaInstanceDelete( vlm_t *p_vlm, int64_t id, vlm_media_instanc ...@@ -805,11 +805,11 @@ static void vlm_MediaInstanceDelete( vlm_t *p_vlm, int64_t id, vlm_media_instanc
input_Stop( p_input, true ); input_Stop( p_input, true );
vlc_thread_join( p_input ); vlc_thread_join( p_input );
var_DelCallback( p_instance->p_input, "intf-event", InputEvent, p_media );
p_resource = input_DetachResource( p_input ); p_resource = input_DetachResource( p_input );
input_resource_Delete( p_resource ); input_resource_Delete( p_resource );
var_DelCallback( p_instance->p_input, "intf-event", InputEvent, p_media );
vlc_object_release( p_input ); vlc_object_release( p_input );
vlm_SendEventMediaInstanceStopped( p_vlm, id, p_media->cfg.psz_name ); 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 * ...@@ -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 ); input_Stop( p_input, !p_input->b_eof && !p_input->b_error );
vlc_thread_join( p_input ); 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 ); 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 ); vlc_object_release( p_input );
if( !p_instance->b_sout_keep ) if( !p_instance->b_sout_keep )
......
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