]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/sunrastenc.c
Merge commit 'f0259a587ee3419dd894873ea617b4c98eeaca1c'
[ffmpeg] / libavcodec / sunrastenc.c
index 0879ce62cb009329c0c39b9d82263467a2b3c598..a55e3d439a9dc7c43054c1b8d06df4a83a988b3b 100644 (file)
@@ -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,