[FFmpeg-cvslog] lavfi/dnn_backend_openvino.c: only allow DFT_PROCESS_FRAME to get output dim

Guo, Yejun git at videolan.org
Thu Apr 8 04:36:09 EEST 2021


ffmpeg | branch: master | Guo, Yejun <yejun.guo at intel.com> | Mon Mar 15 16:42:27 2021 +0800| [d2ccbc966b151f2500aa43e789288af188258ba3] | committer: Guo, Yejun

lavfi/dnn_backend_openvino.c: only allow DFT_PROCESS_FRAME to get output dim

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d2ccbc966b151f2500aa43e789288af188258ba3
---

 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;



More information about the ffmpeg-cvslog mailing list