[vlc-commits] include: replace hardcoded CLOCK_FREQ fractions by VLC_TICK_FROM_MS()

Steve Lhomme git at videolan.org
Tue Jul 3 08:49:15 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jul  3 08:39:44 2018 +0200| [b9bf86ebaa71947cc6d0219ec495f2ab4e273ecb] | committer: Steve Lhomme

include: replace hardcoded CLOCK_FREQ fractions by VLC_TICK_FROM_MS()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b9bf86ebaa71947cc6d0219ec495f2ab4e273ecb
---

 include/vlc_aout.h   | 4 ++--
 include/vlc_config.h | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index 296917f891..d546ee44a2 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -48,11 +48,11 @@
 /* Tolerance values from EBU Recommendation 37 */
 /** Maximum advance of actual audio playback time to coded PTS,
  * above which downsampling will be performed */
-#define AOUT_MAX_PTS_ADVANCE            (CLOCK_FREQ / 25)
+#define AOUT_MAX_PTS_ADVANCE            VLC_TICK_FROM_MS(40)
 
 /** Maximum delay of actual audio playback time from coded PTS,
  * above which upsampling will be performed */
-#define AOUT_MAX_PTS_DELAY              (3 * CLOCK_FREQ / 50)
+#define AOUT_MAX_PTS_DELAY              VLC_TICK_FROM_MS(60)
 
 /* Max acceptable resampling (in %) */
 #define AOUT_MAX_RESAMPLING             10
diff --git a/include/vlc_config.h b/include/vlc_config.h
index a72271d954..95f8e0d0d7 100644
--- a/include/vlc_config.h
+++ b/include/vlc_config.h
@@ -65,7 +65,7 @@
 
 /* Duration between the time we receive the data packet, and the time we will
  * mark it to be presented */
-#define DEFAULT_PTS_DELAY               (3*CLOCK_FREQ/10)
+#define DEFAULT_PTS_DELAY               VLC_TICK_FROM_MS(300)
 
 /*****************************************************************************
  * SPU configuration
@@ -73,7 +73,7 @@
 
 /* Buffer must avoid arriving more than SPU_MAX_PREPARE_TIME in advanced to
  * the SPU */
-#define SPU_MAX_PREPARE_TIME            (CLOCK_FREQ/2)
+#define SPU_MAX_PREPARE_TIME            VLC_TICK_FROM_MS(500)
 
 /*****************************************************************************
  * Video configuration
@@ -101,7 +101,7 @@
  * It should be approximately the time needed to perform a complete picture
  * loop. Since it only happens when the video heap is full, it does not need
  * to be too low, even if it blocks the decoder. */
-#define VOUT_OUTMEM_SLEEP               (CLOCK_FREQ/50)
+#define VOUT_OUTMEM_SLEEP               VLC_TICK_FROM_MS(20)
 
 /* The default video output window title */
 #define VOUT_TITLE                      "VLC"



More information about the vlc-commits mailing list