Commit 500dc20d authored by Rostislav Pehlivanov's avatar Rostislav Pehlivanov

vc2enc: fix segfault

Fixes trac bug #5353

Uninitialized memory for the initial quantization index
Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
parent e7e5c5e6
......@@ -1182,7 +1182,7 @@ static av_cold int vc2_encode_init(AVCodecContext *avctx)
s->num_x = s->plane[0].dwt_width/s->slice_width;
s->num_y = s->plane[0].dwt_height/s->slice_height;
s->slice_args = av_malloc(s->num_x*s->num_y*sizeof(SliceArgs));
s->slice_args = av_calloc(s->num_x*s->num_y, sizeof(SliceArgs));
if (!s->slice_args)
goto alloc_fail;
......
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