diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
| commit | f7813a5324be39d13ab536c245d15dfc602a7849 (patch) | |
| tree | fad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavfilter/lavfutils.c | |
| parent | b7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff) | |
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavfilter/lavfutils.c')
| -rw-r--r-- | ffmpeg/libavfilter/lavfutils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ffmpeg/libavfilter/lavfutils.c b/ffmpeg/libavfilter/lavfutils.c index 8b6b114..58d98cf 100644 --- a/ffmpeg/libavfilter/lavfutils.c +++ b/ffmpeg/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"); @@ -55,7 +57,7 @@ int ff_load_image(uint8_t *data[4], int linesize[4], goto end; } - if (!(frame = avcodec_alloc_frame()) ) { + if (!(frame = av_frame_alloc()) ) { av_log(log_ctx, AV_LOG_ERROR, "Failed to alloc frame\n"); ret = AVERROR(ENOMEM); goto end; @@ -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); |
