Thanks Johan. --- On Tue, 3/31/09, Johan Lantz <johan.lantz at genaker.net> wrote: From: Johan Lantz <johan.lantz@xxxxxxxxxxx> Subject: Re: transport_send_rtcp() segfault issue (Johan Lantz) To: pjsip at lists.pjsip.org Date: Tuesday, March 31, 2009, 1:48 PM Hi Manjeet A simpler approach could perhaps be to not use the heap at all. If you are sending RTCP APP the max size is probably quite small. // pj_uint8_t TXBuffer[MAX_TX_PACKET_SIZE]; pj_uint8_t actualPacketSize; my_create_pkt_function(TXBuffer, &actualPacketSize); transport_send_rtcp(tp, TXBuffer, actualPacketSize); // Now when transport returns you do not have to care about freeing the memory at all. /Johan Message: 5 Date: Mon, 30 Mar 2009 04:50:28 -0700 (PDT) From: manjeet <manjeetss1@xxxxxxxxx> Subject: transport_send_rtcp() segfault issue To: pjsip at lists.pjsip.org Message-ID: <602003.49962.qm at web52009.mail.re2.yahoo.com> Content-Type: text/plain; charset="us-ascii" Hi, I am using "transport_send_rtcp()" to send the RTCP APP packet to the network. The signature is as below :- transport_send_rtcp(pjmedia_transport *tp, const void *pkt, pj_size_t size); Now i am passing a "pkt", which is allocated on the heap in my application as the 2nd parameter to "transport_send_rtcp()". Question is do i need to "delete pkt" in my application once the transport_send_rtcp() return PJ_SUCCESS, or transport_send_rtcp() itseld will take care of this? I tried deleting it when transport_send_rtcp() returns PJ_SUCCESS, but it segfaults sometimes. Any help will be appreciated? Thanks. _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090401/7c46957e/attachment.html>