[Asterisk-cvs] asterisk/channels chan_iax2.c,1.290,1.291
markster at lists.digium.com
markster at lists.digium.com
Wed May 18 19:56:08 CDT 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv8595/channels
Modified Files:
chan_iax2.c
Log Message:
Merge skew reduction (bug #4222)
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.290
retrieving revision 1.291
diff -u -d -r1.290 -r1.291
--- chan_iax2.c 18 May 2005 23:43:13 -0000 1.290
+++ chan_iax2.c 19 May 2005 00:01:11 -0000 1.291
@@ -375,7 +375,7 @@
#define DEFAULT_TRUNKDATA 640 * 10 /* 40ms, uncompressed linear * 10 channels */
#define MAX_TRUNKDATA 640 * 200 /* 40ms, uncompressed linear * 200 channels */
-#define MAX_TIMESTAMP_SKEW 640
+#define MAX_TIMESTAMP_SKEW 160 /* maximum difference between actual and predicted ts for sending */
/* If consecutive voice frame timestamps jump by more than this many milliseconds, then jitter buffer will resync */
#define TS_GAP_FOR_JB_RESYNC 5000
@@ -3476,6 +3476,11 @@
* next multiple of frame size (so our
* silent periods are multiples of
* frame size too) */
+
+ if (abs(ms - p->nextpred) > MAX_TIMESTAMP_SKEW)
+ ast_log(LOG_DEBUG,"predicted timestamp skew (%u) > max (%u), using real ts instead.",
+ abs(ms - p->nextpred), MAX_TIMESTAMP_SKEW);
+
if (f->samples >= 8) /* check to make sure we dont core dump */
{
int diff = ms % (f->samples / 8);
More information about the svn-commits
mailing list