check that frame allocations return non-null.
---
libavfilter/dnn/dnn_backend_native.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libavfilter/dnn/dnn_backend_native.c
b/libavfilter/dnn/dnn_backend_native.c
index d45e211f0c..d1eb992335 100644
--- a/libavfilter/dnn/dnn_backend_native.c
+++ b/libavfilter/dnn/dnn_backend_native.c
@@ -81,6 +81,14 @@ static DNNReturnType get_output_native(void *model, const
char *input_name, int
NativeModel *native_model = (NativeModel *)model;
AVFrame *in_frame = av_frame_alloc();
AVFrame *out_frame = av_frame_alloc();
+
+ if (!in_frame) {
+ return DNN_ERROR;
+ }
+
+ if (!out_frame) {
+ return DNN_ERROR;
+ }
in_frame->width = input_width;
in_frame->height = input_height;
--
2.28.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".