[svn-commits] twilson: branch 1.4 r297310 - /branches/1.4/main/abstract_jb.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Dec 2 12:00:31 CST 2010


Author: twilson
Date: Thu Dec  2 12:00:27 2010
New Revision: 297310

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=297310
Log:
Initialize offset for adaptive jitter buffer

When the adaptive jitter buffer is enabled in sip.conf, the first frame placed
in the jitter buffer fails with something like:

jb_warning_output: Resyncing the jb. last_delay 0, this delay -215886466,
threshold 1000, new offset 215886466

This happens because the offset is not initialized before calling jb_put(). This
patch modifies jb_put_first_adaptive() to set the offset to the frame's
timestamp.

Modified:
    branches/1.4/main/abstract_jb.c

Modified: branches/1.4/main/abstract_jb.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/abstract_jb.c?view=diff&rev=297310&r1=297309&r2=297310
==============================================================================
--- branches/1.4/main/abstract_jb.c (original)
+++ branches/1.4/main/abstract_jb.c Thu Dec  2 12:00:27 2010
@@ -752,6 +752,11 @@
 
 static int jb_put_first_adaptive(void *jb, struct ast_frame *fin, long now)
 {
+	jitterbuf *adaptivejb = (jitterbuf *) jb;
+
+	/* Initialize the offset to that of the first frame's timestamp */
+	adaptivejb->info.resync_offset = fin->ts;
+
 	return jb_put_adaptive(jb, fin, now);
 }
 




More information about the svn-commits mailing list