Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gstreamer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-05-11 15:06:39 +0300
committerSebastian Dröge <sebastian@centricular.com>2016-05-12 09:26:14 +0300
commit1592f5354b0153a5b7fbbc4d845e4ee2c1ddde1c (patch)
tree02d87a9e033edae4ac03961b76efad6ded8f4c55
parent7eb494257c483121ff6dda1d2353925709086e8c (diff)
typefind: Only push a CAPS event downstream if the sinkpad is not in PULL mode
The other signal handlers of the type-found signal might have reactivated typefind in PULL mode already, pushing a CAPS event at that point would cause deadlocks and is in general unexpected by elements that are in PULL mode. https://bugzilla.gnome.org/show_bug.cgi?id=765906
-rw-r--r--plugins/elements/gsttypefindelement.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c
index c6864121ab..453ff75032 100644
--- a/plugins/elements/gsttypefindelement.c
+++ b/plugins/elements/gsttypefindelement.c
@@ -179,6 +179,10 @@ gst_type_find_element_have_type (GstTypeFindElement * typefind,
GST_INFO_OBJECT (typefind, "found caps %" GST_PTR_FORMAT ", probability=%u",
caps, probability);
+ /* Do nothing if downstream is pulling from us */
+ if (GST_PAD_MODE (typefind->src) == GST_PAD_MODE_PULL)
+ return;
+
GST_OBJECT_LOCK (typefind);
/* Now actually send the CAPS event downstream.