summaryrefslogtreecommitdiff
path: root/libavfilter/vf_colorconstancy.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-14 21:31:53 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-20 01:03:52 +0200
commit1ea365082318f06cd42a8b37dd0c7724b599c821 (patch)
tree4df48a8b9f4614803fd2a88c29ad2ff7f7070294 /libavfilter/vf_colorconstancy.c
parent4b154743163ffbe3fdc50759c0c55dc854636488 (diff)
downloadffmpeg-1ea365082318f06cd42a8b37dd0c7724b599c821.tar.gz
Replace all occurences of av_mallocz_array() by av_calloc()
They do the same. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_colorconstancy.c')
-rw-r--r--libavfilter/vf_colorconstancy.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavfilter/vf_colorconstancy.c b/libavfilter/vf_colorconstancy.c
index 25a17788c3..8c54f7c238 100644
--- a/libavfilter/vf_colorconstancy.c
+++ b/libavfilter/vf_colorconstancy.c
@@ -116,7 +116,7 @@ static int set_gauss(AVFilterContext *ctx)
int i;
for (i = 0; i <= difford; ++i) {
- s->gauss[i] = av_mallocz_array(filtersize, sizeof(*s->gauss[i]));
+ s->gauss[i] = av_calloc(filtersize, sizeof(*s->gauss[i]));
if (!s->gauss[i]) {
for (; i >= 0; --i) {
av_freep(&s->gauss[i]);
@@ -219,7 +219,8 @@ static int setup_derivative_buffers(AVFilterContext* ctx, ThreadData *td)
av_log(ctx, AV_LOG_TRACE, "Allocating %d buffer(s) for grey edge.\n", nb_buff);
for (b = 0; b <= nb_buff; ++b) { // We need difford + 1 buffers
for (p = 0; p < NUM_PLANES; ++p) {
- td->data[b][p] = av_mallocz_array(s->planeheight[p] * s->planewidth[p], sizeof(*td->data[b][p]));
+ td->data[b][p] = av_calloc(s->planeheight[p] * s->planewidth[p],
+ sizeof(*td->data[b][p]));
if (!td->data[b][p]) {
cleanup_derivative_buffers(td, b + 1, p);
return AVERROR(ENOMEM);