Commit ea3eaa37 authored by Michael Niedermayer's avatar Michael Niedermayer

flashsv: only realloc blocks for version 2

Fixes 10l regression introducing a memleak
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent eca2eb2d
......@@ -322,9 +322,10 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
s->keyframedata = av_realloc(s->keyframedata, avpkt->size);
memcpy(s->keyframedata, avpkt->data, avpkt->size);
}
s->blocks = av_realloc(s->blocks,
(v_blocks + !!v_part) * (h_blocks + !!h_part)
* sizeof(s->blocks[0]));
if(s->ver == 2)
s->blocks = av_realloc(s->blocks,
(v_blocks + !!v_part) * (h_blocks + !!h_part)
* sizeof(s->blocks[0]));
av_dlog(avctx, "image: %dx%d block: %dx%d num: %dx%d part: %dx%d\n",
s->image_width, s->image_height, s->block_width, s->block_height,
......
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