From: Michael Niedermayer Date: Sat, 12 Oct 2013 09:42:08 +0000 (+0200) Subject: avfilter/lavfutils: fix memleak of avpacket X-Git-Tag: n2.1~346 X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=aeddc6e3a552d094dfb890dd1f017421816e367b;ds=sidebyside avfilter/lavfutils: fix memleak of avpacket Signed-off-by: Michael Niedermayer --- diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c index 8b6b1145fc..b7a103b66c 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);