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>
This commit is contained in:
Reimar Döffinger 2012-02-20 21:20:04 +01:00
parent a297856b8c
commit 6a3f1726af
1 changed files with 1 additions and 0 deletions

View File

@ -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) {