Bugreport: SR RTP timestamp in QueueRTCPManager::dispatchControlPacket()

Mattias Seeman <[email protected]> Mon, 26 May 2008 23:25:40 +0000
Newsgroups gmane.comp.gnu.ccrtp.devel
Message-ID <[email protected]>
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

_______________________________________________
Ccrtp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/ccrtp-devel
libccrtp_1.6.0-1.diff (text/plain, 516 B)
--- 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) *