diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c index d0101e01e4..ba5a03e4ec 100644 --- a/libavcodec/vc2enc.c +++ b/libavcodec/vc2enc.c @@ -867,6 +867,7 @@ static int dwt_plane(AVCodecContext *avctx, void *arg) for (x = 0; x < p->width; x++) { buf[x] = pix[x] - s->diff_offset; } + memset(&buf[x], 0, (p->coef_stride - p->width)*sizeof(dwtcoef)); buf += p->coef_stride; pix += pix_stride; } @@ -876,6 +877,7 @@ static int dwt_plane(AVCodecContext *avctx, void *arg) for (x = 0; x < p->width; x++) { buf[x] = pix[x] - s->diff_offset; } + memset(&buf[x], 0, (p->coef_stride - p->width)*sizeof(dwtcoef)); buf += p->coef_stride; pix += pix_stride; }