Commit b1e53a17 authored by Antoine Cellerier's avatar Antoine Cellerier

Add some locking.

parent f37a79b7
...@@ -106,7 +106,9 @@ static int InputEvent( vlc_object_t *p_this, char const *psz_cmd, ...@@ -106,7 +106,9 @@ static int InputEvent( vlc_object_t *p_this, char const *psz_cmd,
} }
vlm_SendEventMediaInstanceState( p_vlm, p_media->cfg.id, p_media->cfg.psz_name, psz_instance_name, var_GetInteger( p_input, "state" ) ); vlm_SendEventMediaInstanceState( p_vlm, p_media->cfg.id, p_media->cfg.psz_name, psz_instance_name, var_GetInteger( p_input, "state" ) );
vlc_mutex_lock( &p_vlm->lock_manage );
vlc_cond_signal( &p_vlm->wait_manage ); vlc_cond_signal( &p_vlm->wait_manage );
vlc_mutex_unlock( &p_vlm->lock_manage );
} }
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -216,7 +218,9 @@ static void vlm_Destructor( vlm_t *p_vlm ) ...@@ -216,7 +218,9 @@ static void vlm_Destructor( vlm_t *p_vlm )
vlm_ControlInternal( p_vlm, VLM_CLEAR_SCHEDULES ); vlm_ControlInternal( p_vlm, VLM_CLEAR_SCHEDULES );
TAB_CLEAN( p_vlm->schedule, p_vlm->schedule ); TAB_CLEAN( p_vlm->schedule, p_vlm->schedule );
vlc_mutex_lock( &p_vlm->lock_manage );
vlc_cond_signal( &p_vlm->wait_manage ); vlc_cond_signal( &p_vlm->wait_manage );
vlc_mutex_unlock( &p_vlm->lock_manage );
libvlc_priv(p_vlm->p_libvlc)->p_vlm = NULL; libvlc_priv(p_vlm->p_libvlc)->p_vlm = NULL;
vlc_object_kill( p_vlm ); vlc_object_kill( p_vlm );
......
...@@ -995,7 +995,9 @@ static vlm_schedule_sys_t *vlm_ScheduleNew( vlm_t *vlm, const char *psz_name ) ...@@ -995,7 +995,9 @@ static vlm_schedule_sys_t *vlm_ScheduleNew( vlm_t *vlm, const char *psz_name )
TAB_APPEND( vlm->i_schedule, vlm->schedule, p_sched ); TAB_APPEND( vlm->i_schedule, vlm->schedule, p_sched );
vlc_mutex_lock( &vlm->lock_manage );
vlc_cond_signal( &vlm->wait_manage ); vlc_cond_signal( &vlm->wait_manage );
vlc_mutex_unlock( &vlm->lock_manage );
return p_sched; return p_sched;
} }
......
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