[asterisk-dev] [Code Review] 4429: bridge_softmix: G.729 codec license held

rmudgett reviewboard at asterisk.org
Tue Feb 17 13:28:58 CST 2015



> On Feb. 17, 2015, 9:19 a.m., Joshua Colp wrote:
> > branches/11/bridges/bridge_softmix.c, line 317
> > <https://reviewboard.asterisk.org/r/4429/diff/1/?file=71460#file71460line317>
> >
> >     The setting of 0 here confuses me. If it's zero and on the next run some channels request it... won't that throw stuff off?
> >     
> >     I think what needs to be in here is more information about the effective state machine imposed by that variable, how it is used, and the lifetime of the helper entry.
> >     
> >     As it is it's very... confusing...

The num_times_requested counts are valid for the current mixing run.  The counts are incremented for each mixing run.  If nothing uses it on the current mixing run then it is removed.  softmix_translate_helper_cleanup() sets up for the next mixing run.


- rmudgett


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4429/#review14475
-----------------------------------------------------------


On Feb. 16, 2015, 12:30 p.m., Kevin Harwell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4429/
> -----------------------------------------------------------
> 
> (Updated Feb. 16, 2015, 12:30 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24797
>     https://issues.asterisk.org/jira/browse/ASTERISK-24797
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   branches/11/bridges/bridge_softmix.c 431876 
> 
> Diff: https://reviewboard.asterisk.org/r/4429/diff/
> 
> 
> Testing
> -------
> 
> Created a 3 party confbridge. Two channels were using g.729 and the other using ulaw. Hung up both the channels using g.729 and noted that the confbridge was still holding a reference to a g.729 license. After applying the patch noted that it no longer held onto the license.
> 
> 
> Thanks,
> 
> Kevin Harwell
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150217/62aee90f/attachment.html>


More information about the asterisk-dev mailing list