aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cljr.c
diff options
context:
space:
mode:
authorPaul B. Mahol <onemda@gmail.com>2011-12-06 04:14:55 +0000
committerJanne Grunau <janne-libav@jannau.net>2011-12-08 00:36:32 +0100
commit04a5eaa1a5b36c025a609f56eb33437772f5f765 (patch)
treec89aefa2d0bec424013064416680e184830d6fbb /libavcodec/cljr.c
parent392107ad079860fb41c3a9800b6d33ad4b058324 (diff)
downloadffmpeg-04a5eaa1a5b36c025a609f56eb33437772f5f765.tar.gz
cljr: release picture at end of decoding
Otherwise after transcoding from cljr we get: Found 1 unreleased buffers! Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Diffstat (limited to 'libavcodec/cljr.c')
-rw-r--r--libavcodec/cljr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/cljr.c b/libavcodec/cljr.c
index e8d818aa78..6c7d7b0fee 100644
--- a/libavcodec/cljr.c
+++ b/libavcodec/cljr.c
@@ -129,6 +129,13 @@ static av_cold int decode_init(AVCodecContext *avctx){
return 0;
}
+static av_cold int decode_end(AVCodecContext *avctx) {
+ CLJRContext *a = avctx->priv_data;
+
+ if (a->picture.data[0]);
+ avctx->release_buffer(avctx, &a->picture);
+}
+
#if CONFIG_CLJR_ENCODER
static av_cold int encode_init(AVCodecContext *avctx){
@@ -144,6 +151,7 @@ AVCodec ff_cljr_decoder = {
.id = CODEC_ID_CLJR,
.priv_data_size = sizeof(CLJRContext),
.init = decode_init,
+ .close = decode_end,
.decode = decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),