andrey.myznikov at gmail.com
Fri Aug 15 16:46:37 CEST 2014
Attached path fixes potential memory leak in output format context
when av_interleaved_write_frame() is used.
This function can use AVFormatContext.packet_buffer for packet ordering,
but this buffer is not feed later in avformat_free_context().
The Valgrind utiluty clearly shows this leak.
Note polease that when closing input context with
avformat_close_input(AVFormatContext **ps) , the packet_buffer is
correctly freed by flush_packet_queue(s) ->
free_packet_buffer(&s->packet_buffer, &s->packet_buffer_end). But
free_packet_buffer() is declared as static in utils.c and can not be
called directly from application code.
So, I propose to add this call into avformat_free_context() to avoid
memory leaks on output.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 693 bytes
Desc: not available
More information about the ffmpeg-devel