summaryrefslogtreecommitdiff
path: root/libavcodec/jpeg2000dec.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 /libavcodec/jpeg2000dec.c
parent4b154743163ffbe3fdc50759c0c55dc854636488 (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/jpeg2000dec.c')
-rw-r--r--libavcodec/jpeg2000dec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index c95f22bc90..80b2e2d627 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -361,7 +361,7 @@ static int get_siz(Jpeg2000DecoderContext *s)
return AVERROR(EINVAL);
}
- s->tile = av_mallocz_array(s->numXtiles * s->numYtiles, sizeof(*s->tile));
+ s->tile = av_calloc(s->numXtiles * s->numYtiles, sizeof(*s->tile));
if (!s->tile) {
s->numXtiles = s->numYtiles = 0;
return AVERROR(ENOMEM);
@@ -1176,7 +1176,7 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
cblk->nb_lengthinc = 0;
cblk->nb_terminationsinc = 0;
av_free(cblk->lengthinc);
- cblk->lengthinc = av_mallocz_array(newpasses , sizeof(*cblk->lengthinc));
+ cblk->lengthinc = av_calloc(newpasses, sizeof(*cblk->lengthinc));
if (!cblk->lengthinc)
return AVERROR(ENOMEM);
tmp = av_realloc_array(cblk->data_start, cblk->nb_terminations + newpasses + 1, sizeof(*cblk->data_start));