summaryrefslogtreecommitdiff
path: root/include/asterisk/channel_internal.h
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2012-03-14 17:48:40 +0000
committerMatthew Jordan <mjordan@digium.com>2012-03-14 17:48:40 +0000
commit40289b63db97e0dc4fa239cd0ebb3a59644ba2ee (patch)
treef6459240ce7ceeb6a6760bc49947bf1f5d6babee /include/asterisk/channel_internal.h
parent2019a7e6b9672af4f560b5e2c087c6301beb4537 (diff)
Fix incorrect jitter buffer overflow due to missed resynchronizations
When a change in time occurs, such that the timestamps associated with frames being placed into an adaptive jitter buffer (implemented in jitterbuf.c) are significantly different then the previously inserted frames, the jitter buffer checks to see if it needs to be resynched to the new time frame. If three consecutive packets break the threshold, the jitter buffer resynchs itself to the new timestamps. This currently only occurs when history is calculated, and hence only on JB_TYPE_VOICE frames. JB_TYPE_CONTROL frames, on the other hand, are never passed to the history calculations. Because of this, if the jump in time is greater then the maximum allowed length of the jitter buffer, the JB_TYPE_CONTROL frames are dropped and no resynchronization occurs. Alterntively, if the overfill logic is not triggered, the JB_TYPE_CONTROL frame will be placed into the buffer, but with a time reference that is not applicable. Subsequent JB_TYPE_VOICE frames will quickly trigger the overflow logic until reads from the jitter buffer reach the errant JB_TYPE_CONTROL frame. This patch allows JB_TYPE_CONTROL frames to resynch the jitter buffer. As JB_TYPE_CONTROL frames are unlikely to occur in multiples, it perform the resynchronization on any JB_TYPE_CONTROL frame that breaks the resynch threshold. Note that this only impacts chan_iax2, as other consumers of the adaptive jitter buffer use the abstract jitter buffer API, which does not use JB_TYPE_CONTROL frames. Review: https://reviewboard.asterisk.org/r/1814/ (closes issue ASTERISK-18964) Reported by: Kris Shaw Tested by: Kris Shaw, Matt Jordan Patches: jitterbuffer-2012-2-26.diff uploaded by Kris Shaw (license 5722) ........ Merged revisions 359356 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359358 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/channel_internal.h')
0 files changed, 0 insertions, 0 deletions