]> git.ipfire.org Git - thirdparty/asterisk.git/commit
abstract/fixed/adpative jitter buffer: disallow frame re-inserts 13/4713/3
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:45 +0000 (17:08 -0600)
commit434ae90d736b9445dd36f8ccf8751fec0edcafe3
treea9830d1b88d3ace9c5cc66f378e5494d7b60f5f2
parent75c8536d74294d525917a3ce3575b7790e1d5f80
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