Commit aeddc6e3 authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/lavfutils: fix memleak of avpacket

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent eedfee12
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment