[FFmpeg-devel,v2,1/4] avfilter/af_silencedetect: change parameters order for av_malllocz_array

Submitted by lance.lmwang@gmail.com on Sept. 30, 2019, 3:20 p.m.

Details

Message ID 20190930152009.6804-1-lance.lmwang@gmail.com
State New
Headers show

Commit Message

lance.lmwang@gmail.com Sept. 30, 2019, 3:20 p.m.
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavfilter/af_silencedetect.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavfilter/af_silencedetect.c b/libavfilter/af_silencedetect.c
index 3a71f39..c31109f 100644
--- a/libavfilter/af_silencedetect.c
+++ b/libavfilter/af_silencedetect.c
@@ -143,10 +143,10 @@  static int config_input(AVFilterLink *inlink)
 
     s->channels = inlink->channels;
     s->independent_channels = s->mono ? s->channels : 1;
-    s->nb_null_samples = av_mallocz_array(sizeof(*s->nb_null_samples), s->independent_channels);
+    s->nb_null_samples = av_mallocz_array(s->independent_channels, sizeof(*s->nb_null_samples));
     if (!s->nb_null_samples)
         return AVERROR(ENOMEM);
-    s->start = av_malloc_array(sizeof(*s->start), s->independent_channels);
+    s->start = av_malloc_array(s->independent_channels, sizeof(*s->start));
     if (!s->start)
         return AVERROR(ENOMEM);
     for (c = 0; c < s->independent_channels; c++)