summaryrefslogtreecommitdiff
path: root/libavcodec/indeo2.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/indeo2.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/indeo2.c')
-rw-r--r--libavcodec/indeo2.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c
index 53624a1078..87d1c909ea 100644
--- a/libavcodec/indeo2.c
+++ b/libavcodec/indeo2.c
@@ -213,6 +213,17 @@ static av_cold int ir2_decode_init(AVCodecContext *avctx){
return 0;
}
+static av_cold int ir2_decode_end(AVCodecContext *avctx){
+ Ir2Context * const ic = avctx->priv_data;
+ AVFrame *pic = &ic->picture;
+
+ if (pic->data[0])
+ avctx->release_buffer(avctx, pic);
+ av_freep(&ic->picture);
+
+ return 0;
+}
+
AVCodec indeo2_decoder = {
"indeo2",
CODEC_TYPE_VIDEO,
@@ -220,7 +231,7 @@ AVCodec indeo2_decoder = {
sizeof(Ir2Context),
ir2_decode_init,
NULL,
- NULL,
+ ir2_decode_end,
ir2_decode_frame,
CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 2"),