summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-23 15:52:45 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-23 15:52:45 +0200
commit1aa388d4397e8d4a45aee1b4404ec812d2c91b87 (patch)
tree29267d9f31656888158dd9e9bd7869ce3e5de1ae /libavcodec
parent7de2cea8a9eac61e4a328da397e3e1c3d0e56278 (diff)
downloadffmpeg-streaming-1aa388d4397e8d4a45aee1b4404ec812d2c91b87.zip
ffmpeg-streaming-1aa388d4397e8d4a45aee1b4404ec812d2c91b87.tar.gz
avcodec/jpeg2000dwt: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/jpeg2000dwt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c
index 266edec..ceceda3 100644
--- a/libavcodec/jpeg2000dwt.c
+++ b/libavcodec/jpeg2000dwt.c
@@ -518,17 +518,17 @@ int ff_jpeg2000_dwt_init(DWTContext *s, uint16_t border[2][2],
}
switch (type) {
case FF_DWT97:
- s->f_linebuf = av_malloc((maxlen + 12) * sizeof(*s->f_linebuf));
+ s->f_linebuf = av_malloc_array((maxlen + 12), sizeof(*s->f_linebuf));
if (!s->f_linebuf)
return AVERROR(ENOMEM);
break;
case FF_DWT97_INT:
- s->i_linebuf = av_malloc((maxlen + 12) * sizeof(*s->i_linebuf));
+ s->i_linebuf = av_malloc_array((maxlen + 12), sizeof(*s->i_linebuf));
if (!s->i_linebuf)
return AVERROR(ENOMEM);
break;
case FF_DWT53:
- s->i_linebuf = av_malloc((maxlen + 6) * sizeof(*s->i_linebuf));
+ s->i_linebuf = av_malloc_array((maxlen + 6), sizeof(*s->i_linebuf));
if (!s->i_linebuf)
return AVERROR(ENOMEM);
break;
OpenPOWER on IntegriCloud