summaryrefslogtreecommitdiff
path: root/libavcodec/truemotion2.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2009-10-14 05:28:24 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2009-10-14 05:28:24 +0000
commit6d924b5a5f39e33a02c4b39cc5892911bb508d4e (patch)
treece4410c381b5672151cadacb10cf1fddd706593d /libavcodec/truemotion2.c
parentea09f691943091bf831befcf9f18288ccdcb6acf (diff)
Release frame after decoding is done
Originally committed as revision 20231 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/truemotion2.c')
-rw-r--r--libavcodec/truemotion2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 09c500146d..d73c88bd44 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -845,6 +845,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
static av_cold int decode_end(AVCodecContext *avctx){
TM2Context * const l = avctx->priv_data;
+ AVFrame *pic = &l->pic;
int i;
if(l->last)
@@ -862,6 +863,11 @@ static av_cold int decode_end(AVCodecContext *avctx){
av_free(l->U2);
av_free(l->V2);
}
+
+ if (pic->data[0])
+ avctx->release_buffer(avctx, pic);
+ av_freep(&l->pic);
+
return 0;
}