[FFmpeg-cvslog] avfilter/afir_template: stop using hack to zero out data

Paul B Mahol git at videolan.org
Thu Dec 22 18:05:19 EET 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Dec 20 16:18:07 2022 +0100| [bc1fc1be993b70ae0ad7ae322239547a29b8b0d3] | committer: Paul B Mahol

avfilter/afir_template: stop using hack to zero out data

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc1fc1be993b70ae0ad7ae322239547a29b8b0d3
---

 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));



More information about the ffmpeg-cvslog mailing list