[Tizen/API] Bugfix on get_state
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Fri, 22 Mar 2019 05:52:17 +0000 (14:52 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 27 Mar 2019 06:52:38 +0000 (15:52 +0900)
gst_state should not wait indefinitely. Let's give 100us as the "deadline".

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
tizen-api/src/tizen-api-pipeline.c

index 25bc687..96b80db 100644 (file)
@@ -437,9 +437,7 @@ nns_pipeline_getstate (nns_pipeline_h pipe, nns_pipeline_state * state)
     return NNS_ERROR_INVALID_PARAMETER;
 
   g_mutex_lock (&p->lock);
-  scret =
-      gst_element_get_state (p->element, &_state, &pending,
-      GST_CLOCK_TIME_NONE);
+  scret = gst_element_get_state (p->element, &_state, &pending, 100000UL);      /* Do it within 100us! */
   g_mutex_unlock (&p->lock);
 
   if (scret == GST_STATE_CHANGE_FAILURE)