[vlc-devel] commit: VLM : move input event callback deletion. In order to receive all inputs events it' s better to delete callbacks just before releasing the object. ( Sébastien Escudier )

git version control git at videolan.org
Mon Aug 24 21:05:14 CEST 2009


vlc | branch: master | Sébastien Escudier <sebastien-devel at celeos.eu> | Mon Aug 17 16:38:56 2009 +0200| [5604a58909270997980eb0d815e5057abab2cf18] | committer: Rémi Denis-Courmont 

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 <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5604a58909270997980eb0d815e5057abab2cf18
---

 src/input/vlm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/input/vlm.c b/src/input/vlm.c
index 42fbe5b..716bc7d 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 )




More information about the vlc-devel mailing list