diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-10-14 05:28:24 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-10-14 05:28:24 +0000 |
commit | 6d924b5a5f39e33a02c4b39cc5892911bb508d4e (patch) | |
tree | ce4410c381b5672151cadacb10cf1fddd706593d /libavcodec/ulti.c | |
parent | ea09f691943091bf831befcf9f18288ccdcb6acf (diff) | |
download | ffmpeg-6d924b5a5f39e33a02c4b39cc5892911bb508d4e.tar.gz |
Release frame after decoding is done
Originally committed as revision 20231 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ulti.c')
-rw-r--r-- | libavcodec/ulti.c | 13 |
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, |