[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 13:51:37 CDT 2014



> On July 15, 2014, 10:59 a.m., Matt Jordan wrote:
> > /team/group/media_formats-reviewed-trunk/codecs/codec_dahdi.c, lines 79-85
> > <https://reviewboard.asterisk.org/r/3787/diff/1/?file=63338#file63338line79>
> >
> >     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.
> 
> rmudgett wrote:
>     This array is new to the media_formats branch.  The size is what popped out at me.  Now that I look at the use of the array it cannot work.  The users of the array only pass a 0-31 index value not a (1 << (0-31)) index value.

Ah, I didn't realize the array was new. Definitely needs to get fixed then :-)


- Matt


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


On July 15, 2014, 1:49 p.m., rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3787/
> -----------------------------------------------------------
> 
> (Updated July 15, 2014, 1:49 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 418654 
>   /team/group/media_formats-reviewed-trunk/main/slinfactory.c 418654 
>   /team/group/media_formats-reviewed-trunk/main/format_cache.c 418654 
>   /team/group/media_formats-reviewed-trunk/main/channel.c 418654 
>   /team/group/media_formats-reviewed-trunk/main/audiohook.c 418654 
>   /team/group/media_formats-reviewed-trunk/include/asterisk/format_cache.h 418654 
>   /team/group/media_formats-reviewed-trunk/codecs/codec_speex.c 418654 
>   /team/group/media_formats-reviewed-trunk/codecs/codec_resample.c 418654 
>   /team/group/media_formats-reviewed-trunk/codecs/codec_dahdi.c 418654 
>   /team/group/media_formats-reviewed-trunk/bridges/bridge_softmix.c 418654 
>   /team/group/media_formats-reviewed-trunk/apps/app_mixmonitor.c 418654 
>   /team/group/media_formats-reviewed-trunk/apps/app_jack.c 418654 
> 
> 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/42685159/attachment-0001.html>


More information about the asterisk-dev mailing list