Commit 286c7107 authored by Michel Bardiaux's avatar Michel Bardiaux Committed by Panagiotis Issaris

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
parent 09d7aa7e
...@@ -232,6 +232,16 @@ static int bmp_decode_frame(AVCodecContext *avctx, ...@@ -232,6 +232,16 @@ static int bmp_decode_frame(AVCodecContext *avctx,
return buf_size; 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 = { AVCodec bmp_decoder = {
"bmp", "bmp",
CODEC_TYPE_VIDEO, CODEC_TYPE_VIDEO,
...@@ -239,6 +249,6 @@ AVCodec bmp_decoder = { ...@@ -239,6 +249,6 @@ AVCodec bmp_decoder = {
sizeof(BMPContext), sizeof(BMPContext),
bmp_decode_init, bmp_decode_init,
NULL, NULL,
NULL, bmp_decode_end,
bmp_decode_frame bmp_decode_frame
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment