diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-14 06:17:05 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-14 06:17:05 +0200 |
commit | 14e2e40f3b5bdeeb96b5e7c783be2c09b405cb88 (patch) | |
tree | 80664f80bfdcc2189093a086f9e1e30354b6802f | |
parent | 0aac9b76bc7770a90d1317f9979644aefb341ffa (diff) | |
download | ffmpeg-14e2e40f3b5bdeeb96b5e7c783be2c09b405cb88.tar.gz |
avfilter/vf_hqdn3: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/vf_hqdn3d.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index f96f2384c4..0448c0d1e8 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -133,7 +133,7 @@ static void denoise_depth(HQDN3DContext *s, uint16_t *frame_ant = *frame_ant_ptr; if (!frame_ant) { uint8_t *frame_src = src; - *frame_ant_ptr = frame_ant = av_malloc(w*h*sizeof(uint16_t)); + *frame_ant_ptr = frame_ant = av_malloc_array(w, h*sizeof(uint16_t)); for (y = 0; y < h; y++, src += sstride, frame_ant += w) for (x = 0; x < w; x++) frame_ant[x] = LOAD(x); @@ -259,7 +259,7 @@ static int config_input(AVFilterLink *inlink) s->vsub = desc->log2_chroma_h; s->depth = desc->comp[0].depth_minus1+1; - s->line = av_malloc(inlink->w * sizeof(*s->line)); + s->line = av_malloc_array(inlink->w, sizeof(*s->line)); if (!s->line) return AVERROR(ENOMEM); |