1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

vf_sab: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-06-18 00:07:12 +02:00
parent f9cd317223
commit f31fd06713

View File

@ -180,7 +180,7 @@ static int open_filter_param(FilterParam *f, int width, int height, unsigned int
vec = sws_getGaussianVec(f->radius, f->quality);
f->dist_width = vec->length;
f->dist_linesize = FFALIGN(vec->length, 8);
f->dist_coeff = av_malloc(f->dist_width * f->dist_linesize * sizeof(*f->dist_coeff));
f->dist_coeff = av_malloc_array(f->dist_width, f->dist_linesize * sizeof(*f->dist_coeff));
if (!f->dist_coeff) {
sws_freeVec(vec);
return AVERROR(ENOMEM);