[Ffmpeg-cvslog] r7607 - trunk/libavcodec/flashsv.c

banan subversion
Sun Jan 21 15:14:50 CET 2007


Author: banan
Date: Sun Jan 21 15:14:50 2007
New Revision: 7607

Modified:
   trunk/libavcodec/flashsv.c

Log:
The block_size might be used incorrectly if it is not updated.


Modified: trunk/libavcodec/flashsv.c
==============================================================================
--- trunk/libavcodec/flashsv.c	(original)
+++ trunk/libavcodec/flashsv.c	Sun Jan 21 15:14:50 2007
@@ -135,12 +135,12 @@
     if(s->block_size < s->block_width*s->block_height) {
         if (s->tmpblock != NULL)
             av_free(s->tmpblock);
-        s->block_size = s->block_width*s->block_height;
-        if ((s->tmpblock = av_malloc(3*s->block_size)) == NULL) {
+        if ((s->tmpblock = av_malloc(3*s->block_width*s->block_height)) == NULL) {
             av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
             return -1;
         }
     }
+    s->block_size = s->block_width*s->block_height;
 
     /* init the image size once */
     if((avctx->width==0) && (avctx->height==0)){




More information about the ffmpeg-cvslog mailing list