Mercurial > libavcodec.hg
diff bmp.c @ 4455:8ecfb7ecbb53 libavcodec
Add decode_end method to bmp decoder. Patch by Michel Bardiaux,
mbardiaux mediaxim dot be.
author | takis |
---|---|
date | Thu, 01 Feb 2007 09:48:09 +0000 |
parents | fc9a42d0e848 |
children | de0e893ef264 |
line wrap: on
line diff
--- a/bmp.c Thu Feb 01 09:47:36 2007 +0000 +++ b/bmp.c Thu Feb 01 09:48:09 2007 +0000 @@ -232,6 +232,16 @@ 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 @@ sizeof(BMPContext), bmp_decode_init, NULL, - NULL, + bmp_decode_end, bmp_decode_frame };