diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-01 03:49:36 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-14 23:04:44 +0200 |
commit | b8102ce56d8accc8aaf098b58f5c673f5772c5d8 (patch) | |
tree | 80fc8fe07cff2dbb9dbf4c6603f6a49feb6d87f3 | |
parent | f38c42b913abcfeea110fce8ec55233c731edd0d (diff) | |
download | ffmpeg-b8102ce56d8accc8aaf098b58f5c673f5772c5d8.tar.gz |
cmdutils_opencl: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 80da227c660e7bef7400f602a9817a897f07022b)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | cmdutils_opencl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmdutils_opencl.c b/cmdutils_opencl.c index 2a04db9a8a..d7e3287e4b 100644 --- a/cmdutils_opencl.c +++ b/cmdutils_opencl.c @@ -224,7 +224,7 @@ int opt_opencl_bench(void *optctx, const char *opt, const char *arg) av_log(NULL, AV_LOG_ERROR, "No OpenCL device detected!\n"); return AVERROR(EINVAL); } - if (!(devices = av_malloc(sizeof(OpenCLDeviceBenchmark) * nb_devices))) { + if (!(devices = av_malloc_array(nb_devices, sizeof(OpenCLDeviceBenchmark)))) { av_log(NULL, AV_LOG_ERROR, "Could not allocate buffer\n"); return AVERROR(ENOMEM); } |