Hi Ming, you fixed OK for samples_per_frame. I have some other questions Question 1: pjmedia-codec/silk.c, in function silk_codec_open() /* Inform the stream to prepare a larger buffer since we cannot parse * SILK packets and split it into individual frames. */ attr->info.max_rx_frame_size = attr->info.max_bps * attr->info.frm_ptime / 8 / 1000; if ((attr->info.max_bps * attr->info.frm_ptime) % 8000 != 0) { ++attr->info.max_rx_frame_size; } attr->info.max_rx_frame_size *= SILK_MAX_FRAMES_PER_PACKET; Why should we multiply with SILK_MAX_FRAMES_PER_PACKET? Question 2: pjmedia/rtcp.c, in function pjmedia_rtcp_init2() /* Set clock rate */ sess->clock_rate = settings->clock_rate; sess->pkt_size = settings->samples_per_frame; Why should not it be like this sess->pkt_size = settings->samples_per_frame * si->param->setting.frm_per_pkt (with si is pjmedia_stream_info) ? On Wed, Jan 23, 2013 at 8:41 AM, Ming <ming at teluu.com> wrote: > Hi Khoa Pham, > > Thanks for spotting this, I just fixed the calculation in r4328 > (https://trac.pjsip.org/repos/changeset/4328). > > Regards, > Ming > > On Tue, Jan 22, 2013 at 7:05 PM, Khoa Pham <onmyway133 at gmail.com> wrote: > > Hi all, > > > > In pjmedia-codec/silk.c, the struct silk_private contains the field > > "samples_per_frame", what is that? Is that the number of sample per > frame? > > > > If yes, this code in silk_codec_open() in silk.c does not make sense > > > > silk->samples_per_frame = attr->setting.frm_per_pkt * FRAME_LENGTH_MS * > > attr->info.clock_rate / 1000; > > > > Why should we multiply with "frm_per_pkt" ?? > > > > -- > > Khoa Pham > > HCMC University of Science > > Faculty of Information Technology > > > > _______________________________________________ > > 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 > -- Khoa Pham HCMC University of Science Faculty of Information Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130123/80ed9b0f/attachment-0001.html>