Commit 33840cc0 authored by banan's avatar banan

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7607 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7dec5071
......@@ -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)){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment