uridecodebin3: check state in src_pad_added callback 94/234794/4 accepted/tizen/unified/20200603.150157 submit/tizen/20200602.071248
authorEunhye Choi <eunhae1.choi@samsung.com>
Wed, 27 May 2020 11:28:40 +0000 (20:28 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Tue, 2 Jun 2020 06:46:18 +0000 (15:46 +0900)
- avoid deadlock during autoplugging
- get state before linking between urisourcebin and decodebin3
  to avoid resync state change of the uridecodebin3

Change-Id: I7f0fb12527c13b9c09ee4506d24fbfa168a06986

gst/playback/gsturidecodebin3.c
packaging/gst-plugins-base.spec

index 8665992..939c2ac 100644 (file)
@@ -710,6 +710,11 @@ src_pad_added_cb (GstElement * element, GstPad * pad,
   GST_DEBUG_OBJECT (uridecodebin,
       "New pad %" GST_PTR_FORMAT " from source %" GST_PTR_FORMAT, pad, element);
 
+#ifdef TIZEN_FEATURE_U3_AVOID_DEADLOCK
+  /* to sync the process with typefind task */
+  gst_element_get_state (uridecodebin, NULL, NULL, 1 * GST_SECOND);
+#endif
+
   /* FIXME: Add probe to unify group_id and detect EOS */
 
   /* Try to link to main sink pad only if it's from a main handler */
index 7dc7d3c..0fbce08 100644 (file)
@@ -93,6 +93,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing\
  -DTIZEN_FEATURE_SUBPARSE_MODIFICATION\
  -DTIZEN_FEATURE_VOLUME_MODIFICATION\
  -DTIZEN_FEATURE_FORCE_SW_DECODER\
+ -DTIZEN_FEATURE_U3_AVOID_DEADLOCK\
 %if "%{tizen_profile_name}" == "tv"
  -DTIZEN_PROFILE_TV\
  -DTIZEN_FEATURE_TRUSTZONE\