diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-30 18:26:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-30 18:26:28 +0200 |
commit | 8532566e8022b85a3601b5cfb077bcd4d303ae73 (patch) | |
tree | 186ef154b7a8e5b4fdbc65c73db1d3dc4a1f8a59 /libavcodec | |
parent | 1e25afc1811a279094ebc2bc6407715a439e09ee (diff) | |
download | ffmpeg-8532566e8022b85a3601b5cfb077bcd4d303ae73.tar.gz |
avcodec/mjpegdec: use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mjpegdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 6b1a03b9c8..1aaddd17f5 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -562,8 +562,8 @@ unk_pixfmt: int size = bw * bh * s->h_count[i] * s->v_count[i]; av_freep(&s->blocks[i]); av_freep(&s->last_nnz[i]); - s->blocks[i] = av_mallocz(size * sizeof(**s->blocks)); - s->last_nnz[i] = av_mallocz(size * sizeof(**s->last_nnz)); + s->blocks[i] = av_mallocz_array(size, sizeof(**s->blocks)); + s->last_nnz[i] = av_mallocz_array(size, sizeof(**s->last_nnz)); if (!s->blocks[i] || !s->last_nnz[i]) return AVERROR(ENOMEM); s->block_stride[i] = bw * s->h_count[i]; |