From 684723d07cb1bdbb0a64792109aae6b792629a93 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Wed, 22 Apr 2020 20:19:23 +0900 Subject: [PATCH] systemclock: Fix clock waiting on Windows Add missing parentheses in macro for the divide operation Part-of: --- gst/gstsystemclock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/gstsystemclock.c b/gst/gstsystemclock.c index 550988b856..46a60d0c11 100644 --- a/gst/gstsystemclock.c +++ b/gst/gstsystemclock.c @@ -91,7 +91,7 @@ #define GST_SYSTEM_CLOCK_ENTRY_GET_COND(entry) (&(entry)->cond_val) #define GST_SYSTEM_CLOCK_ENTRY_LOCK(entry) (g_mutex_lock(GST_SYSTEM_CLOCK_ENTRY_GET_LOCK(entry))) #define GST_SYSTEM_CLOCK_ENTRY_UNLOCK(entry) (g_mutex_unlock(GST_SYSTEM_CLOCK_ENTRY_GET_LOCK(entry))) -#define GST_SYSTEM_CLOCK_ENTRY_WAIT_UNTIL(entry,ns) gst_futex_cond_wait_until(GST_SYSTEM_CLOCK_ENTRY_GET_COND(entry),GST_SYSTEM_CLOCK_ENTRY_GET_LOCK(entry),ns) +#define GST_SYSTEM_CLOCK_ENTRY_WAIT_UNTIL(entry,ns) gst_futex_cond_wait_until(GST_SYSTEM_CLOCK_ENTRY_GET_COND(entry),GST_SYSTEM_CLOCK_ENTRY_GET_LOCK(entry),(ns)) #define GST_SYSTEM_CLOCK_ENTRY_BROADCAST(entry) gst_futex_cond_broadcast(GST_SYSTEM_CLOCK_ENTRY_GET_COND(entry)) #define CLOCK_MIN_WAIT_TIME 100 /* ns */ @@ -290,7 +290,7 @@ init_entry (GstClockEntryImpl * entry) #define GST_SYSTEM_CLOCK_ENTRY_GET_COND(entry) (&(entry)->cond) #define GST_SYSTEM_CLOCK_ENTRY_LOCK(entry) (g_mutex_lock(GST_SYSTEM_CLOCK_ENTRY_GET_LOCK(entry))) #define GST_SYSTEM_CLOCK_ENTRY_UNLOCK(entry) (g_mutex_unlock(GST_SYSTEM_CLOCK_ENTRY_GET_LOCK(entry))) -#define GST_SYSTEM_CLOCK_ENTRY_WAIT_UNTIL(entry,ns) g_cond_wait_until(GST_SYSTEM_CLOCK_ENTRY_GET_COND(entry),GST_SYSTEM_CLOCK_ENTRY_GET_LOCK(entry),(ns / 1000)) +#define GST_SYSTEM_CLOCK_ENTRY_WAIT_UNTIL(entry,ns) g_cond_wait_until(GST_SYSTEM_CLOCK_ENTRY_GET_COND(entry),GST_SYSTEM_CLOCK_ENTRY_GET_LOCK(entry),((ns) / 1000)) #define GST_SYSTEM_CLOCK_ENTRY_BROADCAST(entry) g_cond_broadcast(GST_SYSTEM_CLOCK_ENTRY_GET_COND(entry)) #if defined (G_OS_WIN32)