Hi, did you also implemented a custom RTP profile? I mean, how are those audio sample announced and packaged together? Is there an SDP profile to announce such MELP codec? Do you have some link regarding who provide IPR licensing for such MELP codec? Fabio ??? wrote: > Hi, > I think I found why the assertion failed. > The problem is about that I set attr->info.max_bps to the rounded-up 2489. > In stream.c, create_channel() is called to create dec & enc channel. When it > comes to line 1402 which is in create_channel() of stream.c, > > channel->out_pkt_size = sizeof(pjmedia_rtp_hdr) + > stream->codec_param.info.max_bps * > PJMEDIA_MAX_FRAME_DURATION_MS / > 8 / 1000; > > channel->out_pkt_size will be 74 because max_bps is only 2489. > So when appending SDES at line 1333 of stream.c, > > len = create_rtcp_sdes(stream, (pj_uint8_t*)pkt, > stream->enc->out_pkt_size - len); > > We see out_pkt_size - len = 74 - 52 = 22 < 28. So the assertion failed. > > My solution is either to increase the max_bps to 3000 or to redefine the > PJMEDIA_MAX_FRAME_DURATION_MS to 300. > > Well, streamutil.c uses the pjmedia stream in a different way. When > pjmedia_rtcp_build_rtcp () is call, RTCP RR is always built and no SR, so > the returned variable "len" is always 32(sizeof(pjmedia_rtcp_rr_pkt)), not > 52(sizeof(pjmedia_rtcp_sr_pkt)). Finally out_pkt_size = 74 - 32 = 42 > 28. > The assertion won't fail. > > I attached my melp.c, melp.h, and the melp implement code if you need it. I > didn't do many tests so sorry for any bug. > For now, the implement uses float point. There is fixed point version but > the performance is really bad. > > Thank you again for giving me help! > ------------------------------------------------------------------------ > > _______________________________________________ > 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