summaryrefslogtreecommitdiff
path: root/libavcodec/bmp.c
diff options
context:
space:
mode:
authorMichel Bardiaux <mbardiaux@peaktime.be>2007-02-01 09:48:09 +0000
committerPanagiotis Issaris <takis.issaris@uhasselt.be>2007-02-01 09:48:09 +0000
commit286c71074ad85a1c16f23867b6fe29b62142a514 (patch)
tree951511a696c9bf55fe5d842eceb199e89f6174e9 /libavcodec/bmp.c
parent09d7aa7e3067ffbacdef52a0f7634b09c4aaa7ce (diff)
Add decode_end method to bmp decoder. Patch by Michel Bardiaux,
mbardiaux mediaxim dot be. Originally committed as revision 7796 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/bmp.c')
-rw-r--r--libavcodec/bmp.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index 30eee65185..d1cfdce6d9 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -232,6 +232,16 @@ static int bmp_decode_frame(AVCodecContext *avctx,
return buf_size;
}
+static int bmp_decode_end(AVCodecContext *avctx)
+{
+ BMPContext* c = avctx->priv_data;
+
+ if (c->picture.data[0])
+ avctx->release_buffer(avctx, &c->picture);
+
+ return 0;
+}
+
AVCodec bmp_decoder = {
"bmp",
CODEC_TYPE_VIDEO,
@@ -239,6 +249,6 @@ AVCodec bmp_decoder = {
sizeof(BMPContext),
bmp_decode_init,
NULL,
- NULL,
+ bmp_decode_end,
bmp_decode_frame
};