[asterisk-dev] [Code Review] 3787: media_format: Make ast_format_cache_get_slin_by_rate() not return a ref bumped format.

Matt Jordan reviewboard at asterisk.org
Tue Jul 15 10:59:22 CDT 2014


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



/team/group/media_formats-reviewed-trunk/bridges/bridge_softmix.c
<https://reviewboard.asterisk.org/r/3787/#comment22921>

    I think a comment explaining why the write_frame reference counted and the read_frame non-reference counted is appropriate here. It is non-intuitive.



/team/group/media_formats-reviewed-trunk/codecs/codec_dahdi.c
<https://reviewboard.asterisk.org/r/3787/#comment22922>

    While clearly not a "good thing"... this isn't new. I'm not sure it should be a BUGBUG, which are generally things we have to fix before this gets merged.
    
    I'd prefer to open an issue to fix this in at a latter time.


- Matt Jordan


On July 14, 2014, 7:44 p.m., rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3787/
> -----------------------------------------------------------
> 
> (Updated July 14, 2014, 7:44 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> There are a few places where the ref originally returned by ast_format_cache_get_slin_by_rate() is not really needed.  The ast_format_cache_get_slin_by_rate() is really a convenience function to pick the best global ast_format_slinxxx value which is accessed directly throughout the code.
> 
> * Simplified many uses of ast_format_cache_get_slin_by_rate() to not have to unref the format.
> 
> * Added some BUGBUG comments about the translation code trashing the normal static frame setup when a special frame is needed in codec_dahdi.c and codec_speex.c.
> 
> 
> Diffs
> -----
> 
>   /team/group/media_formats-reviewed-trunk/res/res_stasis_snoop.c 418614 
>   /team/group/media_formats-reviewed-trunk/main/slinfactory.c 418614 
>   /team/group/media_formats-reviewed-trunk/main/format_cache.c 418614 
>   /team/group/media_formats-reviewed-trunk/main/channel.c 418614 
>   /team/group/media_formats-reviewed-trunk/main/audiohook.c 418614 
>   /team/group/media_formats-reviewed-trunk/include/asterisk/format_cache.h 418614 
>   /team/group/media_formats-reviewed-trunk/codecs/codec_speex.c 418614 
>   /team/group/media_formats-reviewed-trunk/codecs/codec_resample.c 418614 
>   /team/group/media_formats-reviewed-trunk/codecs/codec_dahdi.c 418614 
>   /team/group/media_formats-reviewed-trunk/bridges/bridge_softmix.c 418614 
>   /team/group/media_formats-reviewed-trunk/apps/app_mixmonitor.c 418614 
>   /team/group/media_formats-reviewed-trunk/apps/app_jack.c 418614 
> 
> Diff: https://reviewboard.asterisk.org/r/3787/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> rmudgett
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140715/58beb2d9/attachment-0001.html>


More information about the asterisk-dev mailing list