ccrtp-devel
[Top][All Lists]
Advanced

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

[Ccrtp-devel] Bug report RTPDataQueue::getCurrentTimestamp()


From: Guillaume Fraysse
Subject: [Ccrtp-devel] Bug report RTPDataQueue::getCurrentTimestamp()
Date: Thu, 9 Jan 2003 16:18:39 +0100

Hello everyone,

While having a go at ccRTP with a co-worker of mine, we had a little 
synchronization problem which led us to find a bug in the 
uint32 RTPDataQueue::getCurrentTimestamp() const (in queue.cpp) method :

The following line :
uint32 result = now.tv_usec - getInitialTime().tv_usec;

gives an incorrect result if getInitialTime().tv_usec > now.tv_usec as you 
expect to get an unsigned integer. 

We fixed it by removing the unsigned :
int32 result = now.tv_usec - getInitialTime().tv_usec;

And now it works better.

Hope this helps, please tell us if we got something wrong,
Cheers

Guillaume & Guillaume




reply via email to

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