summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-13 23:14:18 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-13 23:14:18 +0200
commit263aeb826d1fce014473bcc0554101c1d74715b0 (patch)
treece13adfba6ad7828492a08719d4343a144889173
parent043bcdcdb00ebcbae80d7a9f78b763b33b9f0d15 (diff)
downloadffmpeg-streaming-263aeb826d1fce014473bcc0554101c1d74715b0.zip
ffmpeg-streaming-263aeb826d1fce014473bcc0554101c1d74715b0.tar.gz
avfilter/vf_unsharp: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavfilter/vf_unsharp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index b9f6821..37053d9 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -184,7 +184,8 @@ static int init_filter_param(AVFilterContext *ctx, UnsharpFilterParam *fp, const
effect, effect_type, fp->msize_x, fp->msize_y, fp->amount / 65535.0);
for (z = 0; z < 2 * fp->steps_y; z++)
- if (!(fp->sc[z] = av_malloc(sizeof(*(fp->sc[z])) * (width + 2 * fp->steps_x))))
+ if (!(fp->sc[z] = av_malloc_array(width + 2 * fp->steps_x,
+ sizeof(*(fp->sc[z])))))
return AVERROR(ENOMEM);
return 0;
OpenPOWER on IntegriCloud