From fa51a60dbc1cf7bdb3cd079902fafb1451b65730 Mon Sep 17 00:00:00 2001 From: Eunhye Choi Date: Wed, 27 May 2020 20:28:40 +0900 Subject: [PATCH] uridecodebin3: check state in src_pad_added callback - 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 | 5 +++++ packaging/gst-plugins-base.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/gst/playback/gsturidecodebin3.c b/gst/playback/gsturidecodebin3.c index 8665992..939c2ac 100644 --- a/gst/playback/gsturidecodebin3.c +++ b/gst/playback/gsturidecodebin3.c @@ -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 */ diff --git a/packaging/gst-plugins-base.spec b/packaging/gst-plugins-base.spec index 7dc7d3c..0fbce08 100644 --- a/packaging/gst-plugins-base.spec +++ b/packaging/gst-plugins-base.spec @@ -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\ -- 2.7.4