<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px;
font-family: Calibri, sans-serif;"><div>I’ve only been working with the FFMPEG libs (directly) for a few weeks so I’m not sure about what I’ve found.</div><div><br></div><div>I’ve created a short program that demonstrates the problem. The program can be found at <a href="https://github.com/trafficland/rtpmemleak">https://github.com/trafficland/rtpmemleak</a>.</div><div><br></div><div>There’s a much more detailed explanation which can be found here <a href="https://github.com/trafficland/rtpmemleak/blob/master/README.md">https://github.com/trafficland/rtpmemleak/blob/master/README.md</a>.</div><div><br></div><div>The short version is that after streaming packets to a multicast address using a RTP formatted stream, the RtpMuxContext.buf field is not released by avformat_close_input. </div><div><br></div><div>The only way to clean up that field is to do it manually as follows (a snippet from the code found at the links).</div><div><br></div><div><div>//*** The memory assigned to dstFmtCtxt->priv_data->buf must be cleaned up manually as it is not cleaned up by avformat_close_input</div><div>//*** Comment out the next 2 lines and run valgrind to see the leak stats.</div><div>RTPMuxContext* x = (struct RTPMuxContext *) dstFmtCtxt->priv_data;</div><div>av_free(x->buf);</div><div>avformat_close_input(&dstFmtCtxt);</div><div><br></div><div>Sample valgrind reports can be found
at the links as well.</div><div><br></div><div>Is this a genuine leak or am
I missing a cleanup call?</div><div><br></div></div><div><div id="AppleMailSignature"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-align: -webkit-auto; widows: 2; border-spacing: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span"
style="border-collapse: separate; text-align: -webkit-auto; border-spacing: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; text-align: -webkit-auto; border-spacing: 0px;"><div>Eric Reichert</div></span></div></span></div></span></span></div></div></body></html>
<HTML><BR><br>CONFIDENTIALITY NOTICE - The information contained in this e-mail and any accompanying documents may
contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any
dissemination, distribution or other use of the contents of this message by
anyone other than the intended recipient is strictly prohibited.</HTML>