[vlc-devel] commit: Fix VLM scheduling. (Antoine Cellerier )
git version control
git at videolan.org
Mon Feb 8 21:36:58 CET 2010
vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Mon Feb 8 21:38:08 2010 +0100| [d84370a8519245f27883dd59c0ce406a5af48a61] | committer: Antoine Cellerier
Fix VLM scheduling.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d84370a8519245f27883dd59c0ce406a5af48a61
---
src/input/vlm.c | 4 ++--
src/input/vlmshell.c | 10 ++++++----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/input/vlm.c b/src/input/vlm.c
index 31ac195..650d87f 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -147,7 +147,7 @@ vlm_t *vlm_New ( vlc_object_t *p_this )
vlc_mutex_init( &p_vlm->lock );
vlc_mutex_init( &p_vlm->lock_manage );
- vlc_cond_init( &p_vlm->wait_manage );
+ vlc_cond_init_daytime( &p_vlm->wait_manage );
p_vlm->i_id = 1;
TAB_INIT( p_vlm->i_media, p_vlm->media );
TAB_INIT( p_vlm->i_schedule, p_vlm->schedule );
@@ -375,7 +375,7 @@ static void* Manage( void* p_object )
vlc_mutex_lock( &vlm->lock_manage );
if( i_nextschedule )
- vlc_cond_timedwait( &vlm->wait_manage, &vlm->lock_manage, i_nextschedule-mdate() );
+ vlc_cond_timedwait( &vlm->wait_manage, &vlm->lock_manage, i_nextschedule );
else
vlc_cond_wait( &vlm->wait_manage, &vlm->lock_manage );
vlc_mutex_unlock( &vlm->lock_manage );
diff --git a/src/input/vlmshell.c b/src/input/vlmshell.c
index a1eec6b..db5d005 100644
--- a/src/input/vlmshell.c
+++ b/src/input/vlmshell.c
@@ -664,6 +664,11 @@ static int ExecuteScheduleProperty( vlm_t *p_vlm, vlm_schedule_sys_t *p_schedule
}
}
*pp_status = vlm_MessageSimpleNew( psz_cmd );
+
+ vlc_mutex_lock( &p_vlm->lock_manage );
+ vlc_cond_signal( &p_vlm->wait_manage );
+ vlc_mutex_unlock( &p_vlm->lock_manage );
+
return VLC_SUCCESS;
error:
@@ -996,10 +1001,6 @@ 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;
}
@@ -1217,6 +1218,7 @@ static int vlm_ScheduleSetup( vlm_schedule_sys_t *schedule, const char *psz_cmd,
{
return 1;
}
+
return 0;
}
More information about the vlc-devel
mailing list