[FFmpeg-cvslog] avfilter/avf_showwaves: zero whole allocated chunk

Paul B Mahol git at videolan.org
Thu May 11 21:16:48 EEST 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu May 11 18:52:33 2023 +0200| [f0136502433d92ce5da3db9d21aa11573764eec3] | committer: Paul B Mahol

avfilter/avf_showwaves: zero whole allocated chunk

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

 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;



More information about the ffmpeg-cvslog mailing list