[asterisk-users] Issues with Siren14 codec in Asterisk 14.3.0

Joshua Colp jcolp at digium.com
Thu Apr 6 10:20:44 CDT 2017


On Thu, Apr 6, 2017, at 12:17 PM, Richard Kenner wrote:
> > I would say this is a bug in func_speex and not in codec_siren14. This
> > is because the datalen is zero. 
> 
> Ah!  So, like?
> 
> *** func_speex.c.orig   2017-02-13 15:00:19.000000000 -0500
> --- func_speex.c        2017-04-06 11:16:03.000000000 -0400
> ***************
> *** 185,189 ****
>         }
>   
> !       speex_preprocess(sdi->state, frame->data.ptr, NULL);
>         snprintf(source, sizeof(source), "%s/speex", frame->src);
>         if (frame->mallocd & AST_MALLOCD_SRC) {
> --- 185,190 ----
>         }
>   
> !       if (frame->data.ptr && frame->datalen)
> !         speex_preprocess(sdi->state, frame->data.ptr, NULL);
>         snprintf(source, sizeof(source), "%s/speex", frame->src);
>         if (frame->mallocd & AST_MALLOCD_SRC) {

Yes, although really you only need to check datalen. If that is set to
non-zero then there is data.

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-users mailing list