[FFmpeg-devel] [PATCH V7 1/6] lavfi/dnn_backend_openvino.c: only allow DFT_PROCESS_FRAME to get output dim
Guo, Yejun
yejun.guo at intel.com
Wed Apr 7 17:17:18 EEST 2021
---
libavfilter/dnn/dnn_backend_openvino.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c
index 9a47d74c15..66845fbd51 100644
--- a/libavfilter/dnn/dnn_backend_openvino.c
+++ b/libavfilter/dnn/dnn_backend_openvino.c
@@ -493,6 +493,11 @@ static DNNReturnType get_output_ov(void *model, const char *input_name, int inpu
IEStatusCode status;
input_shapes_t input_shapes;
+ if (ov_model->model->func_type != DFT_PROCESS_FRAME) {
+ av_log(ctx, AV_LOG_ERROR, "Get output dim only when processing frame.\n");
+ return DNN_ERROR;
+ }
+
if (ctx->options.input_resizable) {
status = ie_network_get_input_shapes(ov_model->network, &input_shapes);
input_shapes.shapes->shape.dims[2] = input_height;
--
2.17.1
More information about the ffmpeg-devel
mailing list