abstract/fixed/adpative jitter buffer: disallow frame re-inserts

It was possible for a frame to be re-inserted into a jitter buffer after it
had been removed from it. A case when this happened was if a frame was read
out of the jitterbuffer, passed to the translation core, and then multiple
frames were returned from said translation core. Upon multiple frames being
returned the first is passed on, but sebsequently "chained" frames are put
back into the read queue. Thus it was possible for a frame to go back into
the jitter buffer where this would cause problems.

This patch adds a flag to frames that are inserted into the channel's read
queue after translation. The abstract jitter buffer code then checks for this
flag and ignores any frames marked as such.

Change-Id: I276c44edc9dcff61e606242f71274265c7779587
This commit is contained in:
Kevin Harwell
2017-01-12 15:58:43 -06:00
parent f4e77a5678
commit 283c16c6b6
8 changed files with 62 additions and 8 deletions

View File

@@ -843,4 +843,7 @@ enum jb_return_code jb_setconf(jitterbuf *jb, jb_conf *conf)
return JB_OK;
}
int jb_is_late(jitterbuf *jb, long ts)
{
return ts + jb->info.current < jb->info.next_voice_ts;
}