[vlc-commits] rtp:session: convert vlc_tick_t to seconds explicitly using SEC_FROM_VLC_TICK()

Steve Lhomme git at videolan.org
Fri Jul 6 16:07:38 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jun 15 08:29:31 2018 +0200| [e5494e21ba0aefbc60fd8fa5465e46e39619744a] | committer: Steve Lhomme

rtp:session: convert vlc_tick_t to seconds explicitly using SEC_FROM_VLC_TICK()

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

 modules/access/rtp/session.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/access/rtp/session.c b/modules/access/rtp/session.c
index 6abf03af21..a4a8268efd 100644
--- a/modules/access/rtp/session.c
+++ b/modules/access/rtp/session.c
@@ -313,7 +313,7 @@ rtp_queue (demux_t *demux, rtp_session_t *session, block_t *block)
              * It is independent of RTP sequence. */
             uint32_t freq = pt->frequency;
             int64_t ts = rtp_timestamp (block);
-            int64_t d = ((now - src->last_rx) * freq) / CLOCK_FREQ;
+            int64_t d = SEC_FROM_VLC_TICK((now - src->last_rx) * freq);
             d        -=    ts - src->last_ts;
             if (d < 0) d = -d;
             src->jitter += ((d - src->jitter) + 8) >> 4;



More information about the vlc-commits mailing list