[Bug 690420] Random lock-up in GstDiscoverer
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Thu Dec 20 09:14:51 PST 2012
https://bugzilla.gnome.org/show_bug.cgi?id=690420
GStreamer | gst-plugins-base | 1.x
--- Comment #5 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2012-12-20 17:14:47 UTC ---
Nasty workaround:
diff --git a/plugins/elements/gsttypefindelement.c
b/plugins/elements/gsttypefindelement.c
index a94439e..2bac590 100644
--- a/plugins/elements/gsttypefindelement.c
+++ b/plugins/elements/gsttypefindelement.c
@@ -889,6 +889,17 @@ gst_type_find_element_chain_do_typefinding
(GstTypeFindElement * typefind,
/* probability is good enough too, so let's make it known ... emiting this
* signal calls our object handler which sets the caps. */
+ {
+ GstObject *_parent;
+
+ if ((_parent = gst_object_get_parent (GST_OBJECT (typefind)))) {
+ /* make sure our bin has finished any state change stuff before
+ * emitting have-type */
+ GST_STATE_LOCK (_parent);
+ GST_STATE_UNLOCK (_parent);
+ gst_object_unref (_parent);
+ }
+ }
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE], 0,
probability, caps);
@@ -1048,6 +1059,17 @@ gst_type_find_element_loop (GstPad * pad)
}
GST_DEBUG ("Emiting found caps %" GST_PTR_FORMAT, found_caps);
+ {
+ GstObject *_parent;
+
+ if ((_parent = gst_object_get_parent (GST_OBJECT (typefind)))) {
+ /* make sure our bin has finished any state change stuff before
+ * emitting have-type */
+ GST_STATE_LOCK (_parent);
+ GST_STATE_UNLOCK (_parent);
+ gst_object_unref (_parent);
+ }
+ }
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE],
0, probability, found_caps);
typefind->mode = MODE_NORMAL;
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list