[vlc-commits] win32:thread: transform milliseconds to ticks using VLC_TICK macros

Steve Lhomme git at videolan.org
Tue Jul 3 11:24:07 CEST 2018


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

win32:thread: transform milliseconds to ticks using VLC_TICK macros

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

 src/win32/thread.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/win32/thread.c b/src/win32/thread.c
index 9b74f220eb..63932f9646 100644
--- a/src/win32/thread.c
+++ b/src/win32/thread.c
@@ -719,7 +719,7 @@ static vlc_tick_t mdate_tick (void)
 
     /* milliseconds */
     static_assert ((CLOCK_FREQ % 1000) == 0, "Broken frequencies ratio");
-    return ts * (CLOCK_FREQ / 1000);
+    return VLC_TICK_FROM_MS( ts );
 }
 #if !VLC_WINSTORE_APP
 static vlc_tick_t mdate_multimedia (void)
@@ -728,7 +728,7 @@ static vlc_tick_t mdate_multimedia (void)
 
     /* milliseconds */
     static_assert ((CLOCK_FREQ % 1000) == 0, "Broken frequencies ratio");
-    return ts * (CLOCK_FREQ / 1000);
+    return VLC_TICK_FROM_MS( ts );
 }
 #endif
 



More information about the vlc-commits mailing list