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/ivi.c | |
parent | 4b154743163ffbe3fdc50759c0c55dc854636488 (diff) |
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/ivi.c')
-rw-r--r-- | libavcodec/ivi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/ivi.c b/libavcodec/ivi.c index cefaf77bfd..77979d04e7 100644 --- a/libavcodec/ivi.c +++ b/libavcodec/ivi.c @@ -313,7 +313,7 @@ av_cold int ff_ivi_init_planes(AVCodecContext *avctx, IVIPlaneDesc *planes, cons planes[1].num_bands = planes[2].num_bands = cfg->chroma_bands; for (p = 0; p < 3; p++) { - planes[p].bands = av_mallocz_array(planes[p].num_bands, sizeof(IVIBandDesc)); + planes[p].bands = av_calloc(planes[p].num_bands, sizeof(*planes[p].bands)); if (!planes[p].bands) return AVERROR(ENOMEM); @@ -372,7 +372,7 @@ static int ivi_init_tiles(const IVIBandDesc *band, IVITile *ref_tile, band->mb_size); av_freep(&tile->mbs); - tile->mbs = av_mallocz_array(tile->num_MBs, sizeof(IVIMbInfo)); + tile->mbs = av_calloc(tile->num_MBs, sizeof(*tile->mbs)); if (!tile->mbs) return AVERROR(ENOMEM); @@ -428,7 +428,7 @@ av_cold int ff_ivi_init_tiles(IVIPlaneDesc *planes, band->num_tiles = x_tiles * y_tiles; av_freep(&band->tiles); - band->tiles = av_mallocz_array(band->num_tiles, sizeof(IVITile)); + band->tiles = av_calloc(band->num_tiles, sizeof(*band->tiles)); if (!band->tiles) { band->num_tiles = 0; return AVERROR(ENOMEM); |