summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2013-10-12 09:42:08 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-10-12 09:52:10 (GMT)
commitaeddc6e3a552d094dfb890dd1f017421816e367b (patch)
tree1b3757921deccea4baa00b133f5097aee427b98b
parenteedfee12c6088d3944bb7e6604fd4996f5c06e7f (diff)
downloadffmpeg-aeddc6e3a552d094dfb890dd1f017421816e367b.zip
ffmpeg-aeddc6e3a552d094dfb890dd1f017421816e367b.tar.gz
ffmpeg-aeddc6e3a552d094dfb890dd1f017421816e367b.tar.bz2
avfilter/lavfutils: fix memleak of avpacket
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--libavfilter/lavfutils.c3
1 files changed, 3 insertions, 0 deletions
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);