diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-08-23 03:49:48 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-08-23 19:57:42 +0200 |
commit | 426c16d61a9b5056a157a1a2a057a4e4d13eef84 (patch) | |
tree | 55583fd30ddec938832e888bf37dd41429746eab /fftools/ffmpeg.c | |
parent | 95b8df687cc0182a4ec7666c2bbc2826c9ef0852 (diff) | |
download | ffmpeg-426c16d61a9b5056a157a1a2a057a4e4d13eef84.tar.gz |
fftools/ffmpeg: Fix leak of AVFilterInOut in case of error
The AVFilterInOuts normally get freed in init_output_filter() when
the corresponding streams get created; yet if an error happens before
one reaches said point, they leak. Therefore this commit makes
ffmpeg_cleanup free them, too.
Fixes ticket #8267.
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'fftools/ffmpeg.c')
-rw-r--r-- | fftools/ffmpeg.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 173ac3c9a0..84306818a2 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -528,6 +528,7 @@ static void ffmpeg_cleanup(int ret) for (j = 0; j < fg->nb_outputs; j++) { OutputFilter *ofilter = fg->outputs[j]; + avfilter_inout_free(&ofilter->out_tmp); av_freep(&ofilter->name); av_freep(&ofilter->formats); av_freep(&ofilter->channel_layouts); |