]> git.ipfire.org Git - thirdparty/asterisk.git/commit
abstract/fixed/adpative jitter buffer: disallow frame re-inserts 14/4714/2
authorKevin Harwell <kharwell@digium.com>
Thu, 12 Jan 2017 21:58:43 +0000 (15:58 -0600)
committerKevin Harwell <kharwell@digium.com>
Tue, 17 Jan 2017 23:08:36 +0000 (17:08 -0600)
commit883e7fde31ab9db886c482f12383f6baa57e9e92
tree295cd8580105ad584c0636d40cc1309c91cd6a5d
parent473330983b47618772b1dd414df8e063e5da6a53
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
include/asterisk/abstract_jb.h
include/asterisk/frame.h
include/jitterbuf.h
main/abstract_jb.c
main/channel.c
main/fixedjitterbuf.c
main/fixedjitterbuf.h
main/jitterbuf.c