changeset 4432:a848b652f0ac libavcodec

Fix segfault in bmp decoder. Patch by Michel Bardiaux mbardiaux mediaxim dot be.
author takis
date Mon, 29 Jan 2007 14:07:12 +0000
parents 85ac154efd99
children 8187c306ffcd
files bmp.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/bmp.c	Mon Jan 29 10:42:36 2007 +0000
+++ b/bmp.c	Mon Jan 29 14:07:12 2007 +0000
@@ -158,6 +158,9 @@
         return -1;
     }
 
+    if(p->data[0])
+        avctx->release_buffer(avctx, p);
+
     p->reference = 0;
     if(avctx->get_buffer(avctx, p) < 0){
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");