From 8e88145d0b43a4572c1c13431c4f7ba644547c80 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Fri, 23 Dec 2011 11:39:41 +0100 Subject: [PATCH] Release buffers after encoding svq1. Fixes ticket #820. --- libavcodec/svq1enc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index 9e6111a3c9..feceaee6e8 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -563,6 +563,10 @@ static av_cold int svq1_encode_end(AVCodecContext *avctx) av_freep(&s->motion_val8[i]); av_freep(&s->motion_val16[i]); } + if(s->current_picture.data[0]) + avctx->release_buffer(avctx, &s->current_picture); + if(s->last_picture.data[0]) + avctx->release_buffer(avctx, &s->last_picture); return 0; }