[vlc-devel] [PATCH 7/8] dbus: avoid vlc_tick_t conversion from hardcoded values

Steve Lhomme robux4 at ycbcr.xyz
Thu Aug 13 14:12:20 CEST 2020


---
 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 075e1629414..0837f640770 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);
 }
 
 /**
-- 
2.26.2



More information about the vlc-devel mailing list