[SCM] libav/experimental: Add decode_end method to bmp decoder. Patch by Michel Bardiaux, mbardiaux mediaxim dot be.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:55:51 UTC 2013


The following commit has been merged in the experimental branch:
commit 286c71074ad85a1c16f23867b6fe29b62142a514
Author: Michel Bardiaux <mbardiaux at peaktime.be>
Date:   Thu Feb 1 09:48:09 2007 +0000

    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

diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index 30eee65..d1cfdce 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -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
 };

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list