1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-26 14:14:54 +02:00

avcodec/fic: clear slice_data

Fixes artifacts
Fixes use of freed memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Michael Niedermayer 2014-02-15 17:19:59 +01:00 committed by Derek Buitenhuis
parent f34d3173fc
commit 144f7a561d

View File

@ -261,6 +261,7 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data,
av_log(avctx, AV_LOG_ERROR, "Could not allocate slice data.\n");
return AVERROR(ENOMEM);
}
memset(ctx->slice_data, 0, nslices * sizeof(ctx->slice_data[0]));
for (slice = 0; slice < nslices; slice++) {
unsigned slice_off = AV_RB32(src + tsize + FIC_HEADER_SIZE + slice * 4);