[FFmpeg-cvslog] avfilter/lavfutils: fix memleak of avpacket
Michael Niedermayer
git at videolan.org
Sat Oct 12 12:14:04 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 12 11:42:08 2013 +0200| [aeddc6e3a552d094dfb890dd1f017421816e367b] | committer: Michael Niedermayer
avfilter/lavfutils: fix memleak of avpacket
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aeddc6e3a552d094dfb890dd1f017421816e367b
---
libavfilter/lavfutils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c
index 8b6b114..b7a103b 100644
--- a/libavfilter/lavfutils.c
+++ b/libavfilter/lavfutils.c
@@ -33,6 +33,8 @@ int ff_load_image(uint8_t *data[4], int linesize[4],
int frame_decoded, ret = 0;
AVPacket pkt;
+ av_init_packet(&pkt);
+
av_register_all();
iformat = av_find_input_format("image2");
@@ -85,6 +87,7 @@ int ff_load_image(uint8_t *data[4], int linesize[4],
av_image_copy(data, linesize, (const uint8_t **)frame->data, frame->linesize, *pix_fmt, *w, *h);
end:
+ av_free_packet(&pkt);
avcodec_close(codec_ctx);
avformat_close_input(&format_ctx);
av_freep(&frame);
More information about the ffmpeg-cvslog
mailing list