[FFmpeg-cvslog] Add missing av_free_packet.

Reimar Döffinger git at videolan.org
Mon Feb 20 21:23:50 CET 2012


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Mon Feb 20 21:20:04 2012 +0100| [6a3f1726af914183ee9b735b6b28e79f0383058d] | committer: Reimar Döffinger

Add missing av_free_packet.

Fixes memory leak when encoding at least with mpegvideo using the
new encode2 function.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6a3f1726af914183ee9b735b6b28e79f0383058d
---

 ffmpeg.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 8f6f039..8d727a3 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) {



More information about the ffmpeg-cvslog mailing list