[Ffmpeg-cvslog] r7796 - trunk/libavcodec/bmp.c
Måns Rullgård
mru
Thu Feb 1 11:32:59 CET 2007
takis said:
> Author: takis
> Date: Thu Feb 1 10:48:09 2007
> New Revision: 7796
>
> Modified:
> trunk/libavcodec/bmp.c
>
> Log:
> Add decode_end method to bmp decoder. Patch by Michel Bardiaux,
> mbardiaux mediaxim dot be.
>
>
> Modified: trunk/libavcodec/bmp.c
> ==============================================================================
> --- trunk/libavcodec/bmp.c (original)
> +++ trunk/libavcodec/bmp.c Thu Feb 1 10:48:09 2007
> @@ -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
> };
IMHO we should come up with a way to avoid replicating this type of boilerplate
code all over the place.
--
M?ns Rullg?rd
mru at inprovide.com
More information about the ffmpeg-cvslog
mailing list