
aforge - issue #406
Patch for memory leak in Video.FFMPEG's VideoFileWriter::Close()
VideoFileWriter::Close() incorrectly deallocates the data->FormatContext structure.
According to ffmpeg's code documentation the AVFormatContext should be free'd with libffmpeg::avformat_free_context(AVFormatContext *s)
The entire structure end related memory is deallocated by avformat_free_context except for data->FormatContext->pb, which should be free'd by libffmpeg::avio_close(*) as shown in the attached patch
- vmmap-after.png 47.83KB
- vmmap-before.png 20.57KB
Comment #1
Posted on Jun 5, 2015 by Grumpy CamelUsing avformat_free_context() instead of av_free() to properly free FFmpeg's format context.
Committed in revision 1734.
Status: Fixed
Labels:
Type-Contribution
Project-Video