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 /libavcodec/webp.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 'libavcodec/webp.c')
-rw-r--r-- | libavcodec/webp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/webp.c b/libavcodec/webp.c index 3efd4438d9..8b19ba4e64 100644 --- a/libavcodec/webp.c +++ b/libavcodec/webp.c @@ -581,8 +581,8 @@ static int decode_entropy_coded_image(WebPContext *s, enum ImageRole role, img->color_cache_bits); return AVERROR_INVALIDDATA; } - img->color_cache = av_mallocz_array(1 << img->color_cache_bits, - sizeof(*img->color_cache)); + img->color_cache = av_calloc(1 << img->color_cache_bits, + sizeof(*img->color_cache)); if (!img->color_cache) return AVERROR(ENOMEM); } else { @@ -596,9 +596,9 @@ static int decode_entropy_coded_image(WebPContext *s, enum ImageRole role, return ret; img->nb_huffman_groups = s->nb_huffman_groups; } - img->huffman_groups = av_mallocz_array(img->nb_huffman_groups * - HUFFMAN_CODES_PER_META_CODE, - sizeof(*img->huffman_groups)); + img->huffman_groups = av_calloc(img->nb_huffman_groups, + HUFFMAN_CODES_PER_META_CODE * + sizeof(*img->huffman_groups)); if (!img->huffman_groups) return AVERROR(ENOMEM); |