[vlc-devel] [PATCH 2/6] modules: use vlc_timer_disarm() instead of a call with 0 delay
Steve Lhomme
robux4 at ycbcr.xyz
Thu Jul 5 15:22:49 CEST 2018
The intent is more readable this way and can be reworked later.
---
modules/access/dvdnav.c | 2 +-
modules/access/live555.cpp | 2 +-
modules/audio_output/waveout.c | 2 +-
modules/lua/extension_thread.c | 2 +-
modules/misc/inhibit/xdg.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index ce2079c6c2..daaa80963a 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -836,7 +836,7 @@ static int Demux( demux_t *p_demux )
{
case DVDNAV_BLOCK_OK: /* mpeg block */
vlc_mutex_lock( &p_sys->still.lock );
- vlc_timer_schedule( p_sys->still.timer, false, 0, 0 );
+ vlc_timer_disarm( p_sys->still.timer );
p_sys->still.b_enabled = false;
vlc_mutex_unlock( &p_sys->still.lock );
if( p_sys->b_reset_pcr )
diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp
index ed6b47205c..6787cf4ea5 100644
--- a/modules/access/live555.cpp
+++ b/modules/access/live555.cpp
@@ -1777,7 +1777,7 @@ static int RollOverTcp( demux_t *p_demux )
var_SetBool( p_demux, "rtsp-tcp", true );
/* We close the old RTSP session */
- vlc_timer_schedule(p_sys->timer, false, 0, 0);
+ vlc_timer_disarm(p_sys->timer);
p_sys->rtsp->sendTeardownCommand( *p_sys->ms, NULL );
Medium::close( p_sys->ms );
RTSPClient::close( p_sys->rtsp );
diff --git a/modules/audio_output/waveout.c b/modules/audio_output/waveout.c
index a79d5d9ed0..42959ac0b6 100644
--- a/modules/audio_output/waveout.c
+++ b/modules/audio_output/waveout.c
@@ -911,7 +911,7 @@ static void WaveOutPause( audio_output_t * p_aout, bool pause, vlc_tick_t date)
}
else
{
- vlc_timer_schedule( sys->volume_poll_timer, false, 0, 0 );
+ vlc_timer_disarm( sys->volume_poll_timer );
res = waveOutRestart( sys->h_waveout );
if( res != MMSYSERR_NOERROR )
{
diff --git a/modules/lua/extension_thread.c b/modules/lua/extension_thread.c
index 7db1c0ba07..3c49faa232 100644
--- a/modules/lua/extension_thread.c
+++ b/modules/lua/extension_thread.c
@@ -385,7 +385,7 @@ static void* Run( void *data )
vlc_dialog_release( p_mgr, p_ext->p_sys->p_progress_id );
p_ext->p_sys->p_progress_id = NULL;
}
- vlc_timer_schedule( p_ext->p_sys->timer, false, 0, 0 );
+ vlc_timer_disarm( p_ext->p_sys->timer );
}
vlc_mutex_unlock( &p_ext->p_sys->command_lock );
diff --git a/modules/misc/inhibit/xdg.c b/modules/misc/inhibit/xdg.c
index 75f0c1e747..27bdfaa22a 100644
--- a/modules/misc/inhibit/xdg.c
+++ b/modules/misc/inhibit/xdg.c
@@ -76,7 +76,7 @@ static void Inhibit (vlc_inhibit_t *ih, unsigned mask)
{
vlc_inhibit_sys_t *sys = ih->p_sys;
bool suspend = (mask & VLC_INHIBIT_DISPLAY) != 0;
- vlc_tick_t delay = suspend ? VLC_TICK_FROM_SEC(30): INT64_C(0);
+ vlc_tick_t delay = suspend ? VLC_TICK_FROM_SEC(30): VLC_TIMER_DISARM;
vlc_timer_schedule (sys->timer, false, delay, delay);
}
--
2.17.0
More information about the vlc-devel
mailing list