From bc1fc1be993b70ae0ad7ae322239547a29b8b0d3 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 20 Dec 2022 16:18:07 +0100 Subject: [PATCH] avfilter/afir_template: stop using hack to zero out data --- libavfilter/afir_template.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/afir_template.c b/libavfilter/afir_template.c index e5eae4b3e2..8766119d39 100644 --- a/libavfilter/afir_template.c +++ b/libavfilter/afir_template.c @@ -59,7 +59,8 @@ static void fn(draw_response)(AVFilterContext *ctx, AVFrame *out) char text[32]; int channel, i, x; - memset(out->data[0], 0, s->h * out->linesize[0]); + for (int y = 0; y < s->h; y++) + memset(out->data[0] + y * out->linesize[0], 0, s->w * 4); phase = av_malloc_array(s->w, sizeof(*phase)); mag = av_malloc_array(s->w, sizeof(*mag));