[FFmpeg-cvslog] cljr: release picture at end of decoding
Paul B. Mahol
git at videolan.org
Fri Dec 9 00:18:54 CET 2011
ffmpeg | branch: master | Paul B. Mahol <onemda at gmail.com> | Tue Dec 6 04:14:55 2011 +0000| [04a5eaa1a5b36c025a609f56eb33437772f5f765] | committer: Janne Grunau
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 at jannau.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=04a5eaa1a5b36c025a609f56eb33437772f5f765
---
libavcodec/cljr.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/libavcodec/cljr.c b/libavcodec/cljr.c
index e8d818a..6c7d7b0 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"),
More information about the ffmpeg-cvslog
mailing list