[FFmpeg-devel] [PATCH v1 1/6] avfilter/af_silencedetect: change parameters order for av_malllocz_array
Limin Wang
lance.lmwang at gmail.com
Mon Oct 7 17:28:01 EEST 2019
On Tue, Oct 01, 2019 at 01:23:04PM +0200, Carl Eugen Hoyos wrote:
> 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?
It's minor change, please corrent me if I'm misunderstanding. by description of the av_malloc_array parameters:
* @param nmemb Number of element
* @param size Size of a single element
>
> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list