All pastes #11908 Raw Edit

Anonymous

public text v1 · immutable
#11908 ·published 2005-05-16 18:04 UTC
rendered paste body
@@ -2309,6 +2309,7 @@
                 len = ast_codec_get_samples(&fr->af) / 8;
        } else if(fr->af.frametype == AST_FRAME_CNG) {
                type = JB_TYPE_SILENCE;
+               ast_log(LOG_WARNING,"schedule_deliver: found a CNG frame\n");
        }

        if ( (!ast_test_flag(iaxs[fr->callno], IAX_USEJITTERBUF)) ) {
@@ -3392,6 +3393,7 @@
                        genuine = 1;
                } else if (f->frametype == AST_FRAME_CNG) {
                        p->notsilenttx = 0;
+                       ast_log(LOG_WARNING,"calc_timestamp: got a CNG frame\n");
                }
        }
        if (!p->offset.tv_sec && !p->offset.tv_usec) {
@@ -3436,6 +3438,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);