ffmpeg: fix memleak of encoder options AVDictionary on failure
authorJames Almer <jamrial@gmail.com>
Sat, 24 Sep 2016 17:59:01 +0000 (14:59 -0300)
committerJames Almer <jamrial@gmail.com>
Sun, 25 Sep 2016 19:17:41 +0000 (16:17 -0300)
Reviewed-by: Josh de Kock <josh@itanimul.li>
Signed-off-by: James Almer <jamrial@gmail.com>
ffmpeg.c

index ec452d2..df55a49 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -513,6 +513,7 @@ static void ffmpeg_cleanup(int ret)
 
         av_frame_free(&ost->filtered_frame);
         av_frame_free(&ost->last_frame);
+        av_dict_free(&ost->encoder_opts);
 
         av_parser_close(ost->parser);