From f0136502433d92ce5da3db9d21aa11573764eec3 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Thu, 11 May 2023 18:52:33 +0200 Subject: [PATCH] avfilter/avf_showwaves: zero whole allocated chunk --- libavfilter/avf_showwaves.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c index 76399ab13d..3db192a835 100644 --- a/libavfilter/avf_showwaves.c +++ b/libavfilter/avf_showwaves.c @@ -591,7 +591,7 @@ static int push_single_pic(AVFilterLink *outlink) av_log(ctx, AV_LOG_DEBUG, "Create frame averaging %"PRId64" samples per column\n", column_max_samples); - memset(sum, 0, nb_channels); + memset(sum, 0, nb_channels * sizeof(*sum)); for (node = showwaves->audio_frames; node; node = node->next) { int i;