From 834a34a55e68230da03f03d877cdc3ff925a068c Mon Sep 17 00:00:00 2001 From: Wook Song Date: Mon, 13 Jan 2020 14:38:25 +0900 Subject: [PATCH] [Filter/OpenVino] bugfix when checking that the fw is already opened This patch fixes a bug at the checking that the sub-plugin framework is already opend by adding a missing mandatory condition. Signed-off-by: Wook Song --- ext/nnstreamer/tensor_filter/tensor_filter_openvino.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/nnstreamer/tensor_filter/tensor_filter_openvino.cc b/ext/nnstreamer/tensor_filter/tensor_filter_openvino.cc index 28429ce..85011f7 100644 --- a/ext/nnstreamer/tensor_filter/tensor_filter_openvino.cc +++ b/ext/nnstreamer/tensor_filter/tensor_filter_openvino.cc @@ -65,6 +65,9 @@ public: // TODO: Need to support other acceleration devices int loadModel (accl_hw hw); + bool isModelLoaded () { + return isLoaded; + } int getInputTensorDim (GstTensorsInfo * info); int getOutputTensorDim (GstTensorsInfo * info); @@ -642,9 +645,11 @@ ov_open (const GstTensorFilterProperties * prop, void **private_data) tfOv = static_cast(*private_data); if (tfOv != nullptr) { - if ((tfOv->getPathModelBin () == model_path_bin) && + if (tfOv->isModelLoaded ()) { + if ((tfOv->getPathModelBin () == model_path_bin) && (tfOv->getPathModelXml () == model_path_xml)) { return TensorFilterOpenvino::RetSuccess; + } } ov_close (prop, private_data); -- 2.7.4