]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Add decode_end method to bmp decoder. Patch by Michel Bardiaux,
authortakis <takis@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 1 Feb 2007 09:48:09 +0000 (09:48 +0000)
committertakis <takis@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 1 Feb 2007 09:48:09 +0000 (09:48 +0000)
mbardiaux mediaxim dot be.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7796 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/bmp.c

index 30eee65185135103728476cfbcd54947dc136d32..d1cfdce6d980e80ddff55305a806d4bb5897f8ce 100644 (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
 };