Fix segfault in bmp decoder. Patch by Michel Bardiaux mbardiaux mediaxim dot be.
authorMichel Bardiaux <mbardiaux@peaktime.be>
Mon, 29 Jan 2007 14:07:12 +0000 (14:07 +0000)
committerPanagiotis Issaris <takis.issaris@uhasselt.be>
Mon, 29 Jan 2007 14:07:12 +0000 (14:07 +0000)
Originally committed as revision 7757 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/bmp.c

index e621c68..5792142 100644 (file)
@@ -158,6 +158,9 @@ static int bmp_decode_frame(AVCodecContext *avctx,
         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");