ccrtp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ccrtp-devel] Bugreport: SR RTP timestamp in QueueRTCPManager::dispatchC


From: Mattias Seeman
Subject: [Ccrtp-devel] Bugreport: SR RTP timestamp in QueueRTCPManager::dispatchControlPacket()
Date: Mon, 26 May 2008 23:25:40 +0000
User-agent: Thunderbird 2.0.0.12 (X11/20080213)

Hi all,

There is an overflow bug in ccrtp-1.6.0 in QueueRTCPManager::dispatchControlPacket() that will cause the RTP timestamp in the sender report to "jump". Using a signed integer to calculate the timestamp fixes this (see attached patch).

kind regards,
\Mattias Seeman

--- libccrtp-1.6.0.orig/src/control.cpp
+++ libccrtp-1.6.0/src/control.cpp
@@ -885,7 +885,7 @@
                pkt->info.SR.sinfo.NTPMSW = htonl(now.tv_sec + 
NTP_EPOCH_OFFSET);
                pkt->info.SR.sinfo.NTPLSW = 
htonl((uint32)(((double)(now.tv_usec)*(uint32)(~0))/1000000.0));
                // RTP timestamp
-               uint32 tstamp = now.tv_usec - getInitialTime().tv_usec;
+               int32 tstamp = now.tv_usec - getInitialTime().tv_usec;
                tstamp *= (getCurrentRTPClockRate()/1000);
                tstamp /= 1000;
                tstamp += (now.tv_sec - getInitialTime().tv_sec) *

reply via email to

[Prev in Thread] Current Thread [Next in Thread]