summaryrefslogtreecommitdiff
path: root/rtp.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-03-20 05:19:45 +0000
committerMark Spencer <markster@digium.com>2004-03-20 05:19:45 +0000
commit7192fbfae700a3f71a82d3a0cdbf54f2890e243d (patch)
treeeec323806c1dce7ed848b01d22a8fbf26486fefc /rtp.c
parentbe59053650097f78cff1a64c84926f252b6d3bba (diff)
Round offset timestamps to nearest 20ms to clean up numbers.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'rtp.c')
-rwxr-xr-xrtp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/rtp.c b/rtp.c
index a1e06f75d..50ec19acb 100755
--- a/rtp.c
+++ b/rtp.c
@@ -366,6 +366,7 @@ static void calc_rxstamp(struct timeval *tv, struct ast_rtp *rtp, unsigned int t
gettimeofday(&rtp->rxcore, NULL);
rtp->rxcore.tv_sec -= timestamp / 8000;
rtp->rxcore.tv_usec -= (timestamp % 8000) * 125;
+ rtp->rxcore.tv_usec -= rtp->rxcore.tv_usec % 20000;
if (rtp->rxcore.tv_usec < 0) {
/* Adjust appropriately if necessary */
rtp->rxcore.tv_usec += 1000000;