[vlc-commits] service_discovery:sap: convert vlc_tick_t to milliseconds using MS_FROM_VLC_TICK()

Steve Lhomme git at videolan.org
Tue Sep 18 15:56:07 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jun 13 11:38:56 2018 +0200| [629b8b31339244bd1bcfeb99a395e6508db4389d] | committer: Steve Lhomme

service_discovery:sap: convert vlc_tick_t to milliseconds using MS_FROM_VLC_TICK()

The internal timeout is passed to poll() in milliseconds.

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

 modules/services_discovery/sap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index adeab5a11b..d33fa3e2bd 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -589,8 +589,8 @@ static void *Run( void *data )
             {
                 /* Compute next timeout */
                 if( p_announce->i_period_trust > 5 )
-                    timeout = __MIN((10 * p_announce->i_period - i_last_period) / 1000, timeout);
-                timeout = __MIN((p_sys->i_timeout - i_last_period)/1000, timeout);
+                    timeout = __MIN(MS_FROM_VLC_TICK(10 * p_announce->i_period - i_last_period), timeout);
+                timeout = __MIN(MS_FROM_VLC_TICK(p_sys->i_timeout - i_last_period), timeout);
             }
         }
 



More information about the vlc-commits mailing list