[Opalvoip-devel] Bug in rtp.cxx
Brought to you by:
csoutheren,
rjongbloed
|
From: Southanon R. <sra...@la...> - 2013-02-15 19:37:01
|
There seems to be a bug in rtp.cxx that causes the jitterLevel to jump
up in some cases. The bug is seen when the difference in time goes from
large to small to large again. This seems to be present in the opal
3.10.9 release.
This is the line of the bug in rtp.cxx, function is Internal_OnReceiveData.
// As per RFC3550 Appendix 8
diff *= GetJitterTimeUnits(); // Convert to timestamp units
long variance = diff - lastTransitTime;
Both "diff" and "lastTransitTime" are unsigned. If lastTransitTime is
bigger than diff, this produces a very large unsigned number. Not the
small negative number we are expecting.
Here is sample output demonstrating what is happening:
0:11.293 RTP Jitter:0xe3494910 rtp.cxx(1346) RTP Session
1, ssrc=3735373445, jitterLevel = 21
0:11.318 RTP Jitter:0xe3494910 rtp.cxx(1305) RTP
Session 1, ssrc=3735373445, tick = 170:25:21.136, lastReceivedPacketTime
= 170:25:21.110, diff = 26
0:11.318 RTP Jitter:0xe3494910 rtp.cxx(1324) RTP
Session 1, ssrc=3735373445, diff = 208, lastTransitTime = 152, variance
= 56, variance2 = 56
0:11.318 RTP Jitter:0xe3494910 rtp.cxx(1346) RTP
Session 1, ssrc=3735373445, jitterLevel = 76
0:11.333 RTP Jitter:0xe3494910 rtp.cxx(1305) RTP
Session 1, ssrc=3735373445, tick = 170:25:21.151, lastReceivedPacketTime
= 170:25:21.136, diff = 15
0:11.333 RTP Jitter:0xe3494910 rtp.cxx(1324) RTP
Session 1, ssrc=3735373445, diff = 120, lastTransitTime = 208, variance
= 4294967208, variance2 = -88
0:11.333 RTP Jitter:0xe3494910 rtp.cxx(1346) RTP
Session 1, ssrc=3735373445, jitterLevel = 4294967279
0:11.353 RTP Jitter:0xe3494910 rtp.cxx(1305) RTP
Session 1, ssrc=3735373445, tick = 170:25:21.170, lastReceivedPacketTime
= 170:25:21.151, diff = 19
0:11.353 RTP Jitter:0xe3494910 rtp.cxx(1324) RTP
Session 1, ssrc=3735373445, diff = 152, lastTransitTime = 120, variance
= 32, variance2 = 32
Notice the jump in the variance value when diff is smaller than
lastTransitTime. variance2 is the same calculation with lastTransitTime
type casted to a long. Since this variance is part of the jitterLevel
calculation, this subsequently causes the jitterLevel to jump in value
dramatically.
Best Regards,
Southanon
|