[FFmpeg-devel] [PATCH v1 1/6] avfilter/af_silencedetect: change parameters order for av_malllocz_array

Carl Eugen Hoyos ceffmpeg at gmail.com
Tue Oct 1 14:23:04 EEST 2019


Am Mo., 30. Sept. 2019 um 15:37 Uhr schrieb <lance.lmwang at gmail.com>:
>
> From: Limin Wang <lance.lmwang at gmail.com>
>
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
>  libavfilter/af_silencedetect.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> 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));

Sorry if this is obvious:
Why?

Carl Eugen


More information about the ffmpeg-devel mailing list