# HG changeset patch # User takis # Date 1170323289 0 # Node ID 8ecfb7ecbb5390cc89c24208e93bc41de17b3b32 # Parent c9ce397604f0b594df88178334acfb52c1474ee7 Add decode_end method to bmp decoder. Patch by Michel Bardiaux, mbardiaux mediaxim dot be. diff -r c9ce397604f0 -r 8ecfb7ecbb53 bmp.c --- 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 };