From 7a0361b06f0afbdcface8cab17751ed2c7e81769 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 16 Jan 2016 23:14:51 +0100 Subject: [PATCH] ffmpeg: fix sws_dict leak on error exit Fixes: 1b79b985cdf860ffa228c00ee5497051/signal_sigsegv_1f99d24_3549_86d92054a79f6ff900fbaf03f8012b32.aif Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer --- ffmpeg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ffmpeg.c b/ffmpeg.c index 86a0960242..1f4277c4c2 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -527,6 +527,8 @@ static void ffmpeg_cleanup(int ret) av_freep(&ost->audio_channels_map); ost->audio_channels_mapped = 0; + av_dict_free(&ost->sws_dict); + avcodec_free_context(&ost->enc_ctx); av_freep(&output_streams[i]);