RTP: fix overflow in jitter computation
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 3 Dec 2008 17:38:01 +0000 (19:38 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 3 Dec 2008 17:38:01 +0000 (19:38 +0200)
modules/access/rtp/session.c

index a4e0d22..497b02a 100644 (file)
@@ -306,7 +306,7 @@ rtp_queue (demux_t *demux, rtp_session_t *session, block_t *block)
              * That is computed from the RTP timestamps and the system clock.
              * It is independent of RTP sequence. */
             uint32_t freq = pt->frequency;
-            uint32_t ts = rtp_timestamp (block);
+            int64_t ts = rtp_timestamp (block);
             int64_t d = ((now - src->last_rx) * freq) / CLOCK_FREQ;
             d        -=    ts - src->last_ts;
             if (d < 0) d = -d;