[vlc-devel] [PATCH 10/15] include: replace hardcoded CLOCK_FREQ multiples by VTICK_FROM_SEC()
Steve Lhomme
robux4 at ycbcr.xyz
Fri Jun 15 17:09:21 CEST 2018
---
include/vlc_aout.h | 2 +-
include/vlc_threads.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index f03b26d4fb9..be764902ae9 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -39,7 +39,7 @@
/* Buffers which arrive in advance of more than AOUT_MAX_PREPARE_TIME
* will cause the calling thread to sleep */
-#define AOUT_MAX_PREPARE_TIME (2 * CLOCK_FREQ)
+#define AOUT_MAX_PREPARE_TIME VTICK_FROM_SEC(2)
/* Buffers which arrive after pts - AOUT_MIN_PREPARE_TIME will be trashed
* to avoid too heavy resampling */
diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index b0891ac88c6..a4c37650fda 100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -865,7 +865,7 @@ VLC_API void mwait(mtime_t deadline);
VLC_API void msleep(mtime_t delay);
#define VLC_HARD_MIN_SLEEP (CLOCK_FREQ/100) /* 10 milliseconds = 1 tick at 100Hz */
-#define VLC_SOFT_MIN_SLEEP (9*CLOCK_FREQ) /* 9 seconds */
+#define VLC_SOFT_MIN_SLEEP VTICK_FROM_SEC(9) /* 9 seconds */
#if defined (__GNUC__) && !defined (__clang__)
/* Linux has 100, 250, 300 or 1000Hz
--
2.17.0
More information about the vlc-devel
mailing list