[Asterisk-cvs] asterisk rtp.c,1.153,1.154
markster
markster
Thu Nov 10 23:16:19 CST 2005
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv12003
Modified Files:
rtp.c
Log Message:
Fix wrap around for rtp (bug #5595)
Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -d -r1.153 -r1.154
--- rtp.c 8 Nov 2005 01:44:47 -0000 1.153
+++ rtp.c 11 Nov 2005 04:07:03 -0000 1.154
@@ -1098,6 +1098,8 @@
/* Use previous txcore if available */
t = (delivery && !ast_tvzero(*delivery)) ? *delivery : ast_tvnow();
ms = ast_tvdiff_ms(t, rtp->txcore);
+ if (ms < 0)
+ ms = 0;
/* Use what we just got for next time */
rtp->txcore = t;
return (unsigned int) ms;
@@ -1226,14 +1228,14 @@
char iabuf[INET_ADDRSTRLEN];
int hdrlen = 12;
int res;
- int ms;
+ unsigned int ms;
int pred;
int mark = 0;
ms = calc_txstamp(rtp, &f->delivery);
/* Default prediction */
if (f->subclass < AST_FORMAT_MAX_AUDIO) {
- pred = rtp->lastts + f->samples;
+ pred = rtp->lastts + f->samples;
/* Re-calculate last TS */
rtp->lastts = rtp->lastts + ms * 8;
More information about the svn-commits
mailing list