aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/v210x.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-13 18:31:22 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-13 18:31:22 +0000
commit0fbb0185b999169a265e5fac2145483dacd73e74 (patch)
treeef8ed2390b1693824b5f0576d8b01b06db35940c /libavcodec/v210x.c
parent4b5fee0205a825e5f0c7b414af6776803e55a78e (diff)
downloadffmpeg-0fbb0185b999169a265e5fac2145483dacd73e74.tar.gz
Call release_buffer on close for v210dec and v210x
Originally committed as revision 20228 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/v210x.c')
-rw-r--r--libavcodec/v210x.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libavcodec/v210x.c b/libavcodec/v210x.c
index 754b70a1f0..fe1b6de30a 100644
--- a/libavcodec/v210x.c
+++ b/libavcodec/v210x.c
@@ -124,6 +124,16 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
return avpkt->size;
}
+static av_cold int decode_close(AVCodecContext *avctx)
+{
+ AVFrame *pic = avctx->coded_frame;
+ if (pic->data[0])
+ avctx->release_buffer(avctx, pic);
+ av_freep(&avctx->coded_frame);
+
+ return 0;
+}
+
AVCodec v210x_decoder = {
"v210x",
CODEC_TYPE_VIDEO,
@@ -131,7 +141,7 @@ AVCodec v210x_decoder = {
0,
decode_init,
NULL,
- NULL,
+ decode_close,
decode_frame,
CODEC_CAP_DR1,
};