diff options
Diffstat (limited to 'libavcodec/jpeg2000dec.c')
-rw-r--r-- | libavcodec/jpeg2000dec.c | 4 |
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)); |