[FIX/LOG] Fix a wrong error message for custom-easy tensor filter
authorDongju Chae <dongju.chae@samsung.com>
Mon, 16 Dec 2019 11:19:29 +0000 (20:19 +0900)
committerwooksong <wook16.song@samsung.com>
Thu, 2 Jan 2020 02:31:57 +0000 (11:31 +0900)
This commit fixes the wrong log message for custom-easy tensor filter.
For this subplugin, we don't need to check whether the model path exists.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
gst/nnstreamer/tensor_filter/tensor_filter_common.c

index b3e2258..61a07ca 100644 (file)
@@ -369,10 +369,13 @@ gst_tensor_filter_common_set_property (GstTensorFilterPrivate * priv,
       g_assert (model_files);
       gst_tensor_filter_parse_modelpaths_string (prop, model_files);
 
-      for (idx = 0; idx < prop->num_models; idx++) {
-        if (!g_file_test (prop->model_files[idx], G_FILE_TEST_IS_REGULAR)) {
-          g_critical ("Cannot find the model file [%d]: %s\n",
-              idx, prop->model_files[idx]);
+      /* 'custom-easy' framework has a virtual model file */
+      if (g_strcmp0 (prop->fwname, "custom-easy") != 0) {
+        for (idx = 0; idx < prop->num_models; idx++) {
+          if (!g_file_test (prop->model_files[idx], G_FILE_TEST_IS_REGULAR)) {
+            g_critical ("Cannot find the model file [%d]: %s\n",
+                idx, prop->model_files[idx]);
+          }
         }
       }