Mercurial > libavcodec.hg
diff ulti.c @ 10399:136334ad62b3 libavcodec
Release frame after decoding is done
author | kostya |
---|---|
date | Wed, 14 Oct 2009 05:28:24 +0000 |
parents | a16f74116015 |
children | 8a137661f31e |
line wrap: on
line diff
--- a/ulti.c Tue Oct 13 20:48:51 2009 +0000 +++ b/ulti.c Wed Oct 14 05:28:24 2009 +0000 @@ -55,6 +55,17 @@ 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 @@ sizeof(UltimotionDecodeContext), ulti_decode_init, NULL, - NULL, + ulti_decode_end, ulti_decode_frame, CODEC_CAP_DR1, NULL,