[Asterisk-cvs] asterisk/channels chan_iax2.c,1.278,1.279

russell at lists.digium.com russell at lists.digium.com
Thu May 12 14:55:08 CDT 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv18412/channels

Modified Files:
	chan_iax2.c 
Log Message:
fixes for the new jitter buffer (bug #4249)


Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.278
retrieving revision 1.279
diff -u -d -r1.278 -r1.279
--- chan_iax2.c	4 May 2005 04:49:32 -0000	1.278
+++ chan_iax2.c	12 May 2005 19:01:03 -0000	1.279
@@ -2147,12 +2147,16 @@
     pvt->jbid = -1;
 
     gettimeofday(&tv,NULL);
+    /* round up a millisecond since ast_sched_runq does; */
+    /* prevents us from spinning while waiting for our now */
+    /* to catch up with runq's now */
+    tv.tv_usec += 1000;
 
     now = (tv.tv_sec - pvt->rxcore.tv_sec) * 1000 +
 	  (tv.tv_usec - pvt->rxcore.tv_usec) / 1000;
 
-    if(now > (next = jb_next(pvt->jb))) {
-	ret = jb_get(pvt->jb,&frame,now);
+    if(now >= (next = jb_next(pvt->jb))) {
+	ret = jb_get(pvt->jb,&frame,now,ast_codec_interp_len(pvt->voiceformat));
 	switch(ret) {
 	    case JB_OK:
 		/*if(frame.type == JB_TYPE_VOICE && next + 20 != jb_next(pvt->jb)) fprintf(stderr, "NEXT %ld is not %ld+20!\n", jb_next(pvt->jb), next); */




More information about the svn-commits mailing list