aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-06 14:33:54 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-06 14:33:54 +0200
commit11e4890eeb82b89a1e86a300df3079fcf70e00e1 (patch)
tree32aee81ec4b654ea738c82cd914de584ebf3d595 /libavfilter
parenta53c5d454ee608fd539e5c02ade3f246470d1cb2 (diff)
downloadffmpeg-11e4890eeb82b89a1e86a300df3079fcf70e00e1.tar.gz
avfilter/unsharp_opencl: use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/unsharp_opencl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/unsharp_opencl.c b/libavfilter/unsharp_opencl.c
index 8ddd9db933..e619cefded 100644
--- a/libavfilter/unsharp_opencl.c
+++ b/libavfilter/unsharp_opencl.c
@@ -54,7 +54,7 @@ static int compute_mask(int step, uint32_t *mask)
ret = AVERROR(ENOMEM);
goto end;
}
- counter = av_mallocz(sizeof(uint32_t *) * (2 * step + 1));
+ counter = av_mallocz_array(2 * step + 1, sizeof(uint32_t *));
if (!counter) {
ret = AVERROR(ENOMEM);
goto end;
@@ -92,12 +92,12 @@ static int compute_mask_matrix(cl_mem cl_mask_matrix, int step_x, int step_y)
int i, j, ret = 0;
uint32_t *mask_matrix, *mask_x, *mask_y;
size_t size_matrix = sizeof(uint32_t) * (2 * step_x + 1) * (2 * step_y + 1);
- mask_x = av_mallocz(sizeof(uint32_t) * (2 * step_x + 1));
+ mask_x = av_mallocz_array(2 * step_x + 1, sizeof(uint32_t));
if (!mask_x) {
ret = AVERROR(ENOMEM);
goto end;
}
- mask_y = av_mallocz(sizeof(uint32_t) * (2 * step_y + 1));
+ mask_y = av_mallocz_array(2 * step_y + 1, sizeof(uint32_t));
if (!mask_y) {
ret = AVERROR(ENOMEM);
goto end;