- /* stop the event handler */
- vlc_object_kill( p_sys->p_ev );
- vlc_thread_join( p_sys->p_ev );
- vlc_object_release( p_sys->p_ev );
+ /* Stop vout event handler */
+ var_DelCallback( p_sys->p_input, "intf-event", EventIntf, p_demux );
+ if( p_sys->p_vout != NULL )
+ { /* Should not happen, but better be safe than sorry. */
+ msg_Warn( p_sys->p_vout, "removing dangling mouse DVD callbacks" );
+ var_DelCallback( p_sys->p_vout, "mouse-moved", EventMouse, p_demux );
+ var_DelCallback( p_sys->p_vout, "mouse-clicked", EventMouse, p_demux );
+ }
+
+ /* Stop key event handler (FIXME: should really be per-vout too) */
+ var_DelCallback( p_demux->p_libvlc, "key-action", EventKey, p_demux );
+
+ /* Stop still image handler */
+ if( p_sys->still.b_created )
+ vlc_timer_destroy( p_sys->still.timer );
+ vlc_mutex_destroy( &p_sys->still.lock );