aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wnv1.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/wnv1.c
parentea09f691943091bf831befcf9f18288ccdcb6acf (diff)
downloadffmpeg-6d924b5a5f39e33a02c4b39cc5892911bb508d4e.tar.gz
Release frame after decoding is done
Originally committed as revision 20231 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wnv1.c')
-rw-r--r--libavcodec/wnv1.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c
index aec474f2de..9f13fd5b76 100644
--- a/libavcodec/wnv1.c
+++ b/libavcodec/wnv1.c
@@ -143,6 +143,17 @@ static av_cold int decode_init(AVCodecContext *avctx){
return 0;
}
+static av_cold int decode_end(AVCodecContext *avctx){
+ WNV1Context * const l = avctx->priv_data;
+ AVFrame *pic = &l->pic;
+
+ if (pic->data[0])
+ avctx->release_buffer(avctx, pic);
+ av_freep(&l->pic);
+
+ return 0;
+}
+
AVCodec wnv1_decoder = {
"wnv1",
CODEC_TYPE_VIDEO,
@@ -150,7 +161,7 @@ AVCodec wnv1_decoder = {
sizeof(WNV1Context),
decode_init,
NULL,
- NULL,
+ decode_end,
decode_frame,
CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Winnov WNV1"),