[Libav-user] Memory leak in av_interleaved_write_frame

Hill, Scott SHill at camber.com
Fri May 20 23:57:37 CEST 2011


 

I am using version 26240.

 

When I call av_interleaved_write_frame it leaks memory.  Is this a known
issue or is there some sort of clean up I need to do?

Code segment:

 

 

        outputSize = avcodec_encode_video(m_Stream->codec,
m_OutputBuffer, m_OutputBufferSize, m_ConvertedPicture);

 

        av_init_packet(m_Packet);

 

        if (m_Stream->codec->coded_frame->pts != AV_NOPTS_VALUE)

            m_Packet->pts=
av_rescale_q(m_Stream->codec->coded_frame->pts,
m_Stream->codec->time_base, m_Stream->time_base);

 

        if(m_Stream->codec->coded_frame->key_frame)

            m_Packet->flags |= AV_PKT_FLAG_KEY;

 

        m_Packet->stream_index= m_Stream->index;

        m_Packet->data= m_OutputBuffer;

        m_Packet->size= outputSize;

 

        /* write the compressed frame in the media file */

        ret = av_interleaved_write_frame(m_FormatCtx, m_Packet);

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20110520/29942e6d/attachment.html>


More information about the Libav-user mailing list