[vlc-commits] dbus: avoid vlc_tick_t conversion from hardcoded values

Steve Lhomme git at videolan.org
Mon Aug 17 16:14:38 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Aug 13 07:41:24 2020 +0200| [22ad23fdfd8cf2841a3f512021e5f2aad7341bb3] | committer: Steve Lhomme

dbus: avoid vlc_tick_t conversion from hardcoded values

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

 modules/control/dbus/dbus.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/control/dbus/dbus.c b/modules/control/dbus/dbus.c
index 075e162941..0837f64077 100644
--- a/modules/control/dbus/dbus.c
+++ b/modules/control/dbus/dbus.c
@@ -477,12 +477,10 @@ static int next_timeout(intf_thread_t *intf)
     if (next_timeout == INT64_MAX)
         return -1;
 
-    next_timeout /= 1000;
-
-    if (next_timeout > INT_MAX)
+    if (MS_FROM_VLC_TICK(next_timeout) > INT_MAX)
         return INT_MAX;
 
-    return (int)next_timeout;
+    return MS_FROM_VLC_TICK(next_timeout);
 }
 
 /**



More information about the vlc-commits mailing list