diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-10-18 11:36:20 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-10-18 11:36:20 +0200 |
commit | 2d9c290a2ffc3a8fe7dfa8a9e3535b8d71e903c6 (patch) | |
tree | f0c7f894f6e1d490a1ad2da7fca2f8d12173115e /libavfilter | |
parent | 0ce7005d34e2d5609d8fd5db28adec4164814477 (diff) | |
download | ffmpeg-2d9c290a2ffc3a8fe7dfa8a9e3535b8d71e903c6.tar.gz |
avfilter/vf_lensfun: use av_malloc_array()
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_lensfun.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_lensfun.c b/libavfilter/vf_lensfun.c index 5cc98020d1..901cd9ff90 100644 --- a/libavfilter/vf_lensfun.c +++ b/libavfilter/vf_lensfun.c @@ -240,7 +240,7 @@ static int config_props(AVFilterLink *inlink) if (!lensfun->distortion_coords) { if (lensfun->mode & SUBPIXEL_DISTORTION) { - lensfun->distortion_coords = av_malloc(sizeof(float) * inlink->w * inlink->h * 2 * 3); + lensfun->distortion_coords = av_malloc_array(inlink->w * inlink->h, sizeof(float) * 2 * 3); if (!lensfun->distortion_coords) return AVERROR(ENOMEM); if (lensfun->mode & GEOMETRY_DISTORTION) { @@ -257,7 +257,7 @@ static int config_props(AVFilterLink *inlink) lensfun->distortion_coords); } } else if (lensfun->mode & GEOMETRY_DISTORTION) { - lensfun->distortion_coords = av_malloc(sizeof(float) * inlink->w * inlink->h * 2); + lensfun->distortion_coords = av_malloc_array(inlink->w * inlink->h, sizeof(float) * 2); if (!lensfun->distortion_coords) return AVERROR(ENOMEM); // apply only geometry distortion @@ -270,7 +270,7 @@ static int config_props(AVFilterLink *inlink) if (!lensfun->interpolation) if (lensfun->interpolation_type == LANCZOS) { - lensfun->interpolation = av_malloc(sizeof(float) * 4 * LANCZOS_RESOLUTION); + lensfun->interpolation = av_malloc_array(LANCZOS_RESOLUTION, sizeof(float) * 4); if (!lensfun->interpolation) return AVERROR(ENOMEM); for (index = 0; index < 4 * LANCZOS_RESOLUTION; ++index) { |