summaryrefslogtreecommitdiff
path: root/libavcodec/flashsv.c
diff options
context:
space:
mode:
authorBenjamin Larsson <banan@ludd.ltu.se>2007-01-21 14:14:50 +0000
committerBenjamin Larsson <banan@ludd.ltu.se>2007-01-21 14:14:50 +0000
commit0f7af066749d5146068952b04f99aeae94b9686d (patch)
tree86a5667035d913f2745105246042082c3f076144 /libavcodec/flashsv.c
parent5c1844ab563c8b82355d9f60b7589a561fd94f4f (diff)
The block_size might be used incorrectly if it is not updated.
Originally committed as revision 7607 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/flashsv.c')
-rw-r--r--libavcodec/flashsv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index 4f99856006..b5905e1ea4 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -135,12 +135,12 @@ static int flashsv_decode_frame(AVCodecContext *avctx,
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)){