From f01919b57af0ff99820b6e8285d6fe546d3ed938 Mon Sep 17 00:00:00 2001 From: Rostislav Pehlivanov Date: Fri, 26 Feb 2016 12:21:36 +0000 Subject: [PATCH] vc2enc: correctly zero out coefficient array padding Credit for figuring this out goes to James Darnley. Signed-off-by: Rostislav Pehlivanov (cherry picked from commit 3ef10406e19663a78791ed1b38178fb00d4c7d88) --- libavcodec/vc2enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c index f42b10ffef..bf3f3a980d 100644 --- a/libavcodec/vc2enc.c +++ b/libavcodec/vc2enc.c @@ -867,7 +867,7 @@ static int dwt_plane(AVCodecContext *avctx, void *arg) } } - memset(buf, 0, (p->coef_stride*p->dwt_height - p->height*p->width)*sizeof(dwtcoef)); + memset(buf, 0, p->coef_stride * (p->dwt_height - p->height) * sizeof(dwtcoef)); for (level = s->wavelet_depth-1; level >= 0; level--) { const SubBand *b = &p->band[level][0];