[Filter] Check if open is successful.
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 25 Feb 2019 02:21:02 +0000 (11:21 +0900)
committerGeunsik Lim <leemgs@users.noreply.github.com>
Mon, 25 Feb 2019 10:43:05 +0000 (19:43 +0900)
Check if open() is successful at the start().

Note that other usage of gst_tensor_filter_open_fw()
if called by gst_tensor_filter_call(), whose
success is checked by "ret" value if required; there
are cases where a "fail" is an option.

Note that by checking it at start callback,
we can ensure that it's successfully opened for
every pipeline start.

Fixes #1160

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
gst/nnstreamer/tensor_filter/tensor_filter.c

index 15a070f..7a3cf85 100644 (file)
@@ -1354,6 +1354,9 @@ gst_tensor_filter_start (GstBaseTransform * trans)
   self = GST_TENSOR_FILTER_CAST (trans);
 
   gst_tensor_filter_open_fw (self);
+
+  if (self->prop.fw_opened == FALSE)
+    return FALSE;
   return TRUE;
 }