diff options
author | Daniel Verkamp <daniel@drv.nu> | 2010-01-08 18:54:52 +0000 |
---|---|---|
committer | Daniel Verkamp <daniel@drv.nu> | 2010-01-08 18:54:52 +0000 |
commit | 0219e99eea6cab75809b71dc9440b43af79f56e0 (patch) | |
tree | 7fdfc8a1b2c2518589c8ded2461cbce9ac3ad946 /libavcodec/cyuv.c | |
parent | 3963a17d0edc86eca5a4c35850e52360e03b6e4e (diff) | |
download | ffmpeg-0219e99eea6cab75809b71dc9440b43af79f56e0.tar.gz |
Release cyuv/aura decoder buffer
Originally committed as revision 21100 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cyuv.c')
-rw-r--r-- | libavcodec/cyuv.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libavcodec/cyuv.c b/libavcodec/cyuv.c index 14eee3e0bd..c947165478 100644 --- a/libavcodec/cyuv.c +++ b/libavcodec/cyuv.c @@ -167,6 +167,16 @@ static int cyuv_decode_frame(AVCodecContext *avctx, return buf_size; } +static av_cold int cyuv_decode_end(AVCodecContext *avctx) +{ + CyuvDecodeContext *s = avctx->priv_data; + + if (s->frame.data[0]) + avctx->release_buffer(avctx, &s->frame); + + return 0; +} + #if CONFIG_AURA_DECODER AVCodec aura_decoder = { "aura", @@ -175,7 +185,7 @@ AVCodec aura_decoder = { sizeof(CyuvDecodeContext), cyuv_decode_init, NULL, - NULL, + cyuv_decode_end, cyuv_decode_frame, CODEC_CAP_DR1, NULL, @@ -191,7 +201,7 @@ AVCodec cyuv_decoder = { sizeof(CyuvDecodeContext), cyuv_decode_init, NULL, - NULL, + cyuv_decode_end, cyuv_decode_frame, CODEC_CAP_DR1, NULL, |