Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-17 15:02:09 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-11-17 15:06:34 +0400
commit3ea168edeb7a20eae1fccf7da66ac7b8c8c791ba (patch)
tree4e167e434117d6f13a92fc7a2a7356108c273816 /libavcodec/sunrastenc.c
parent85b7b0c519f8d9491b4c0340329a605cc97c8984 (diff)
parent45bde93eefa78c1bdb0936109fbd2e2fb27fbfe7 (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.c7
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,