diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-14 21:31:53 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-20 01:03:52 +0200 |
commit | 1ea365082318f06cd42a8b37dd0c7724b599c821 (patch) | |
tree | 4df48a8b9f4614803fd2a88c29ad2ff7f7070294 /libswscale/slice.c | |
parent | 4b154743163ffbe3fdc50759c0c55dc854636488 (diff) | |
download | ffmpeg-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 'libswscale/slice.c')
-rw-r--r-- | libswscale/slice.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libswscale/slice.c b/libswscale/slice.c index b185b4aa18..b3ee06d632 100644 --- a/libswscale/slice.c +++ b/libswscale/slice.c @@ -91,7 +91,7 @@ static int alloc_slice(SwsSlice *s, enum AVPixelFormat fmt, int lumLines, int ch for (i = 0; i < 4; ++i) { int n = size[i] * ( ring == 0 ? 1 : 3); - s->plane[i].line = av_mallocz_array(sizeof(uint8_t*), n); + s->plane[i].line = av_calloc(n, sizeof(*s->plane[i].line)); if (!s->plane[i].line) return AVERROR(ENOMEM); @@ -284,10 +284,10 @@ int ff_init_filters(SwsContext * c) - c->desc = av_mallocz_array(sizeof(SwsFilterDescriptor), c->numDesc); + c->desc = av_calloc(c->numDesc, sizeof(*c->desc)); if (!c->desc) return AVERROR(ENOMEM); - c->slice = av_mallocz_array(sizeof(SwsSlice), c->numSlice); + c->slice = av_calloc(c->numSlice, sizeof(*c->slice)); if (!c->slice) { res = AVERROR(ENOMEM); goto cleanup; |