From 6a3f1726af914183ee9b735b6b28e79f0383058d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Mon, 20 Feb 2012 21:20:04 +0100 Subject: [PATCH] Add missing av_free_packet. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes memory leak when encoding at least with mpegvideo using the new encode2 function. Signed-off-by: Reimar Döffinger --- ffmpeg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ffmpeg.c b/ffmpeg.c index 8f6f039f91..8d727a3a52 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1633,6 +1633,7 @@ static void do_video_out(AVFormatContext *s, OutputStream *ost, write_frame(s, &pkt, ost); frame_size = pkt.size; video_size += pkt.size; + av_free_packet(&pkt); /* if two pass, output log */ if (ost->logfile && enc->stats_out) {