> -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of > Andreas Rheinhardt > Sent: 2021年3月11日 5:55 > To: ffmpeg-devel@ffmpeg.org > Cc: Andreas Rheinhardt <andreas.rheinha...@gmail.com> > Subject: [FFmpeg-devel] [PATCH 19/23] > dnn/dnn_backend_native_layer_conv2d: Check allocation > > Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> > --- > Why does DNN actually not use the ordinary error codes?
DNN_ERROR/DNN_SUCCESS is introduced at the very beginning, @Pedro any comment if we need to revisit the error code? thanks. > > libavfilter/dnn/dnn_backend_native_layer_conv2d.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavfilter/dnn/dnn_backend_native_layer_conv2d.c > b/libavfilter/dnn/dnn_backend_native_layer_conv2d.c > index 94a07c1fdb..941330c895 100644 > --- a/libavfilter/dnn/dnn_backend_native_layer_conv2d.c > +++ b/libavfilter/dnn/dnn_backend_native_layer_conv2d.c > @@ -228,6 +228,8 @@ int ff_dnn_execute_layer_conv2d(DnnOperand > *operands, const int32_t *input_opera > > #if HAVE_PTHREAD_CANCEL > thread_param = av_calloc(thread_num, sizeof(*thread_param)); > + if (!thread_param) > + return DNN_ERROR; LGTM, thanks. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".