diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-14 06:17:27 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-14 06:17:27 +0200 |
commit | 6ab37221c8eeb9736b6bad046322bec19536b3ee (patch) | |
tree | 494b4a18b29ca34e5ccbd9f0ff4edbb86e7c92d9 /libavfilter/vf_removelogo.c | |
parent | 14e2e40f3b5bdeeb96b5e7c783be2c09b405cb88 (diff) | |
download | ffmpeg-6ab37221c8eeb9736b6bad046322bec19536b3ee.tar.gz |
avfilter/vf_removelogo: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_removelogo.c')
-rw-r--r-- | libavfilter/vf_removelogo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_removelogo.c b/libavfilter/vf_removelogo.c index 889050b764..555517f83d 100644 --- a/libavfilter/vf_removelogo.c +++ b/libavfilter/vf_removelogo.c @@ -312,18 +312,18 @@ static av_cold int init(AVFilterContext *ctx) the filter is applied, the mask size is determined on a pixel by pixel basis, with pixels nearer the edge of the logo getting smaller mask sizes. */ - mask = (int ***)av_malloc(sizeof(int **) * (s->max_mask_size + 1)); + mask = (int ***)av_malloc_array(s->max_mask_size + 1, sizeof(int **)); if (!mask) return AVERROR(ENOMEM); for (a = 0; a <= s->max_mask_size; a++) { - mask[a] = (int **)av_malloc(sizeof(int *) * ((a * 2) + 1)); + mask[a] = (int **)av_malloc_array((a * 2) + 1, sizeof(int *)); if (!mask[a]) { av_free(mask); return AVERROR(ENOMEM); } for (b = -a; b <= a; b++) { - mask[a][b + a] = (int *)av_malloc(sizeof(int) * ((a * 2) + 1)); + mask[a][b + a] = (int *)av_malloc_array((a * 2) + 1, sizeof(int)); if (!mask[a][b + a]) { av_free(mask); return AVERROR(ENOMEM); |