summaryrefslogtreecommitdiff
path: root/libavcodec/ulti.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/ulti.c')
-rw-r--r--libavcodec/ulti.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c
index f58874a607..a5aec1a3a9 100644
--- a/libavcodec/ulti.c
+++ b/libavcodec/ulti.c
@@ -55,6 +55,17 @@ static av_cold int ulti_decode_init(AVCodecContext *avctx)
return 0;
}
+static av_cold int ulti_decode_end(AVCodecContext *avctx){
+ UltimotionDecodeContext *s = avctx->priv_data;
+ AVFrame *pic = &s->frame;
+
+ if (pic->data[0])
+ avctx->release_buffer(avctx, pic);
+ av_freep(&s->frame);
+
+ return 0;
+}
+
static const int block_coords[8] = // 4x4 block coords in 8x8 superblock
{ 0, 0, 0, 4, 4, 4, 4, 0};
@@ -401,7 +412,7 @@ AVCodec ulti_decoder = {
sizeof(UltimotionDecodeContext),
ulti_decode_init,
NULL,
- NULL,
+ ulti_decode_end,
ulti_decode_frame,
CODEC_CAP_DR1,
NULL,