diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-17 15:02:09 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-17 15:06:34 +0400 |
commit | 3ea168edeb7a20eae1fccf7da66ac7b8c8c791ba (patch) | |
tree | 4e167e434117d6f13a92fc7a2a7356108c273816 /libavcodec/sunrastenc.c | |
parent | 85b7b0c519f8d9491b4c0340329a605cc97c8984 (diff) | |
parent | 45bde93eefa78c1bdb0936109fbd2e2fb27fbfe7 (diff) |
Merge commit '45bde93eefa78c1bdb0936109fbd2e2fb27fbfe7'
* commit '45bde93eefa78c1bdb0936109fbd2e2fb27fbfe7':
sunrastenc: use the AVFrame API properly.
targaenc: use the AVFrame API properly.
tiffenc: use the AVFrame API properly.
pngenc: use the AVFrame API properly.
Conflicts:
libavcodec/pngenc.c
libavcodec/sunrastenc.c
libavcodec/targaenc.c
libavcodec/tiffenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/sunrastenc.c')
-rw-r--r-- | libavcodec/sunrastenc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/sunrastenc.c b/libavcodec/sunrastenc.c index 0879ce62cb..a55e3d439a 100644 --- a/libavcodec/sunrastenc.c +++ b/libavcodec/sunrastenc.c @@ -198,6 +198,12 @@ static int sunrast_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return 0; } +static av_cold int sunrast_encode_close(AVCodecContext *avctx) +{ + av_frame_free(&avctx->coded_frame); + return 0; +} + static const AVCodecDefault sunrast_defaults[] = { { "coder", "rle" }, { NULL }, @@ -210,6 +216,7 @@ AVCodec ff_sunrast_encoder = { .id = AV_CODEC_ID_SUNRAST, .priv_data_size = sizeof(SUNRASTContext), .init = sunrast_encode_init, + .close = sunrast_encode_close, .encode2 = sunrast_encode_frame, .defaults = sunrast_defaults, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24, |