Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Michael Niedermayer authored on 2013/10/12 18:42:08... | ... |
@@ -33,6 +33,8 @@ int ff_load_image(uint8_t *data[4], int linesize[4], |
33 | 33 |
int frame_decoded, ret = 0; |
34 | 34 |
AVPacket pkt; |
35 | 35 |
|
36 |
+ av_init_packet(&pkt); |
|
37 |
+ |
|
36 | 38 |
av_register_all(); |
37 | 39 |
|
38 | 40 |
iformat = av_find_input_format("image2"); |
... | ... |
@@ -85,6 +87,7 @@ int ff_load_image(uint8_t *data[4], int linesize[4], |
85 | 85 |
av_image_copy(data, linesize, (const uint8_t **)frame->data, frame->linesize, *pix_fmt, *w, *h); |
86 | 86 |
|
87 | 87 |
end: |
88 |
+ av_free_packet(&pkt); |
|
88 | 89 |
avcodec_close(codec_ctx); |
89 | 90 |
avformat_close_input(&format_ctx); |
90 | 91 |
av_freep(&frame); |