Fix for: PJMEDIA - IPP - G729-codec generates silence packet when annexb=no

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Arie,

Just created ticket #1112 (http://trac.pjsip.org/repos/ticket/1112)
and checked in the patch to SVN trunk.

Thanks for such detail report and including the fix.

BR,
nanang


On Tue, Aug 17, 2010 at 10:01 PM, Arie Velthoen
<arie_velthoen at hotmail.com> wrote:
> Hi?Benny,
>
> I sent fix below some weeks ago.
> I noticed that it didn't make into the 1.7 release.
> Maybe you can add it to the trunk for a next release?
>
> Regards,
> Arie Velthoen
>
>
> ________________________________
> From: arie_velthoen@xxxxxxxxxxx
> To: pjsip at lists.pjsip.org
> Date: Mon, 2 Aug 2010 10:58:12 +0200
> Subject: Fix for: PJMEDIA - IPP - G729-codec generates silence
> packet when annexb=no
>
> Hi,
>
>
>
> PJMEDIA - IPP - G729-codec generates silence packet and sends no RTP during
> silence, although it has received SDP containing ?fmtp:18 annexb=no?
>
>
>
> In ipp_codec.c - ipp_codec_open the ipp-codec-attribute vad ?is switched off
> when params (from SDP) contains ?annexb=0?. (OK)
>
>
>
> However also ipp_codec_modify is called twice at the beginning of the call
> to temporarily reset vad,
>
> and restore it again according the original value of pjmedia-codec-parameter
> ?attr->setting.vad?.
>
> Thus when ?attr->setting.vad? is 1, then ipp-codec-attribute vad ?will be
> set to 1 again, despite the SDP-contents.
>
> (NOT OK)
>
>
>
> I have solved this as follows:
>
> In ipp_codec.c - ipp_codec_open set ?add the marked lines:
>
>
>
> ??? /* Check if G729 Annex B is signaled to be disabled */
>
> ??? for (i = 0; i < attr->setting.enc_fmtp.cnt; ++i) {
>
> ????? if (pj_stricmp2(&attr->setting.enc_fmtp.param[i].name, "annexb")==0)
>
> ? ????{
>
> ??????? if (pj_stricmp2(&attr->setting.enc_fmtp.param[i].val, "no")==0)
>
> add>>?? {
>
> add>>???? attr->setting.vad = 0;
>
> ????????? codec_data->info->params.modes.vad = 0;
>
> add>>?? }
>
> ??????? break;
>
> ????? }
>
>
>
>
>
>
>
> Regards,
>
>
>
> Arie
>
> _______________________________________________ Visit our blog:
> http://blog.pjsip.org pjsip mailing list pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux