summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-02-20 21:20:04 +0100
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-02-20 21:23:00 +0100
commit6a3f1726af914183ee9b735b6b28e79f0383058d (patch)
treef0839d90263cff42d0cc0371ecb3ca603b519d66 /ffmpeg.c
parenta297856b8ced5a01efff26d13ea68a41d2021b02 (diff)
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@gmx.de>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c1
1 files changed, 1 insertions, 0 deletions
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) {