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
This commit is contained in:
Michel Bardiaux 2007-02-01 09:48:09 +00:00 committed by Panagiotis Issaris
parent 09d7aa7e30
commit 286c71074a
1 changed files with 11 additions and 1 deletions

View File

@ -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
};