mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avfilter/vf_unsharp: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
043bcdcdb0
commit
263aeb826d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user