comparison 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
comparison
equal deleted inserted replaced
4454:c9ce397604f0 4455:8ecfb7ecbb53
230 *data_size = sizeof(AVPicture); 230 *data_size = sizeof(AVPicture);
231 231
232 return buf_size; 232 return buf_size;
233 } 233 }
234 234
235 static int bmp_decode_end(AVCodecContext *avctx)
236 {
237 BMPContext* c = avctx->priv_data;
238
239 if (c->picture.data[0])
240 avctx->release_buffer(avctx, &c->picture);
241
242 return 0;
243 }
244
235 AVCodec bmp_decoder = { 245 AVCodec bmp_decoder = {
236 "bmp", 246 "bmp",
237 CODEC_TYPE_VIDEO, 247 CODEC_TYPE_VIDEO,
238 CODEC_ID_BMP, 248 CODEC_ID_BMP,
239 sizeof(BMPContext), 249 sizeof(BMPContext),
240 bmp_decode_init, 250 bmp_decode_init,
241 NULL, 251 NULL,
242 NULL, 252 bmp_decode_end,
243 bmp_decode_frame 253 bmp_decode_frame
244 }; 254 };