[FFmpeg-devel] [PATCH] Fix mem leak interrupt during avformat_open_input

Lukasz Marek lukasz.m.luki2 at gmail.com
Sat Apr 5 20:55:07 CEST 2014

On 03.04.2014 09:48, Schenk, Michael wrote:
> Hi!,
> when using interrupt_callback during avformat_open_input(...) it may happen on certain demux that they
> leak memory because iformat->read_close() will not be called in the error path. The attached patch
> fix that.

Did you test what is exactly leaking? I noticed a leak for output 
formats. When write_trailer is not called then default values for string 
options are leaking.
Your patch may cause a problem when some formats doesn't consider 
possible calling read_close without read_header earlier.
It didn't review it deeply, so maybe it won't happpen, but my point is 
if cleaning up options isn't enough?

More information about the ffmpeg-devel mailing list