mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
flashsv: only realloc blocks for version 2
Fixes 10l regression introducing a memleak Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
eca2eb2dfa
commit
ea3eaa37b1
@ -322,9 +322,10 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
s->keyframedata = av_realloc(s->keyframedata, avpkt->size);
|
s->keyframedata = av_realloc(s->keyframedata, avpkt->size);
|
||||||
memcpy(s->keyframedata, avpkt->data, avpkt->size);
|
memcpy(s->keyframedata, avpkt->data, avpkt->size);
|
||||||
}
|
}
|
||||||
s->blocks = av_realloc(s->blocks,
|
if(s->ver == 2)
|
||||||
(v_blocks + !!v_part) * (h_blocks + !!h_part)
|
s->blocks = av_realloc(s->blocks,
|
||||||
* sizeof(s->blocks[0]));
|
(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",
|
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,
|
s->image_width, s->image_height, s->block_width, s->block_height,
|
||||||
|
Loading…
Reference in New Issue
Block a user