mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
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:
parent
a297856b8c
commit
6a3f1726af
1
ffmpeg.c
1
ffmpeg.c
@ -1633,6 +1633,7 @@ static void do_video_out(AVFormatContext *s, OutputStream *ost,
|
|||||||
write_frame(s, &pkt, ost);
|
write_frame(s, &pkt, ost);
|
||||||
frame_size = pkt.size;
|
frame_size = pkt.size;
|
||||||
video_size += pkt.size;
|
video_size += pkt.size;
|
||||||
|
av_free_packet(&pkt);
|
||||||
|
|
||||||
/* if two pass, output log */
|
/* if two pass, output log */
|
||||||
if (ost->logfile && enc->stats_out) {
|
if (ost->logfile && enc->stats_out) {
|
||||||
|
Loading…
Reference in New Issue
Block a user