bridge_softmix: G.729 codec license held
authorKevin Harwell <kharwell@digium.com>
Tue, 24 Feb 2015 18:38:03 +0000 (18:38 +0000)
committerKevin Harwell <kharwell@digium.com>
Tue, 24 Feb 2015 18:38:03 +0000 (18:38 +0000)
commit91733b5d15fb864af8e3ee5712b62ba405e17a39
tree406bbaafec96d62872030daca83bc30a5d9f950b
parentbedf51b2cebab8284aafa20237c883e9db6f6bb2
bridge_softmix: G.729 codec license held

When more than one call using the same codec type enters into a softmix bridge
and no audio is present for a channel the bridge optimizes the out frame by
using the same one for all channels with the same codec type. Unfortunately,
when that number (channels with same codec type) dropped to <= 1 the codec
was not dereferenced. At least not until all parties left the bridge. Thus in
the case of G.729 the license was not released. This patch ensures that the
codec is dereferenced immediately when the optimization no longer applies.

ASTERISK-24797 #close
Reported by: Luke Hulsey
Review: https://reviewboard.asterisk.org/r/4429/
........

Merged revisions 432174 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 432175 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
bridges/bridge_softmix.c