mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 21:06:42 +00:00
cmdutils_opencl: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
46563af79c
commit
80da227c66
@ -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");
|
av_log(NULL, AV_LOG_ERROR, "No OpenCL device detected!\n");
|
||||||
return AVERROR(EINVAL);
|
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");
|
av_log(NULL, AV_LOG_ERROR, "Could not allocate buffer\n");
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user