[vlc-devel] commit: Add some locking. (Antoine Cellerier )
git version control
git at videolan.org
Sat Feb 6 16:48:05 CET 2010
vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Sat Feb 6 16:49:27 2010 +0100| [b1e53a17fd3b276cb05e90ff1d5614cb77616e0f] | committer: Antoine Cellerier
Add some locking.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b1e53a17fd3b276cb05e90ff1d5614cb77616e0f
---
src/input/vlm.c | 4 ++++
src/input/vlmshell.c | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/input/vlm.c b/src/input/vlm.c
index 18017f4..46e01fb 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -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" ) );
+ vlc_mutex_lock( &p_vlm->lock_manage );
vlc_cond_signal( &p_vlm->wait_manage );
+ vlc_mutex_unlock( &p_vlm->lock_manage );
}
return VLC_SUCCESS;
}
@@ -216,7 +218,9 @@ static void vlm_Destructor( vlm_t *p_vlm )
vlm_ControlInternal( p_vlm, VLM_CLEAR_SCHEDULES );
TAB_CLEAN( p_vlm->schedule, p_vlm->schedule );
+ vlc_mutex_lock( &p_vlm->lock_manage );
vlc_cond_signal( &p_vlm->wait_manage );
+ vlc_mutex_unlock( &p_vlm->lock_manage );
libvlc_priv(p_vlm->p_libvlc)->p_vlm = NULL;
vlc_object_kill( p_vlm );
diff --git a/src/input/vlmshell.c b/src/input/vlmshell.c
index c9fe99c..16ce1e3 100644
--- a/src/input/vlmshell.c
+++ b/src/input/vlmshell.c
@@ -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 );
+ vlc_mutex_lock( &vlm->lock_manage );
vlc_cond_signal( &vlm->wait_manage );
+ vlc_mutex_unlock( &vlm->lock_manage );
return p_sched;
}
More information about the vlc-devel
mailing list