You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
dnn/dnn_backend_native_layer_conv2d: Check allocation
Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
@@ -228,6 +228,8 @@ int ff_dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_opera
|
|||||||
|
|
||||||
#if HAVE_PTHREAD_CANCEL
|
#if HAVE_PTHREAD_CANCEL
|
||||||
thread_param = av_malloc_array(thread_num, sizeof(*thread_param));
|
thread_param = av_malloc_array(thread_num, sizeof(*thread_param));
|
||||||
|
if (!thread_param)
|
||||||
|
return DNN_ERROR;
|
||||||
thread_stride = (height - pad_size * 2) / thread_num;
|
thread_stride = (height - pad_size * 2) / thread_num;
|
||||||
//create threads
|
//create threads
|
||||||
for (int i = 0; i < thread_num; i++){
|
for (int i = 0; i < thread_num; i++){
|
||||||
|
Reference in New Issue
Block a user