gst-plugins-base: decodebin: Do not block on sticky and oob events

Sebastian Dröge slomo at kemper.freedesktop.org
Mon Apr 16 04:49:12 PDT 2012


Module: gst-plugins-base
Branch: master
Commit: b6765417e18fd97435b77464439c999f49c6a186
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=b6765417e18fd97435b77464439c999f49c6a186

Author: Matej Knopp <matej.knopp at gmail.com>
Date:   Mon Apr 16 13:43:41 2012 +0200

decodebin: Do not block on sticky and oob events

---

 gst/playback/gstdecodebin2.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
index b2cb4ee..b2d271e 100644
--- a/gst/playback/gstdecodebin2.c
+++ b/gst/playback/gstdecodebin2.c
@@ -3752,6 +3752,14 @@ source_pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
   GstDecodeChain *chain;
   GstDecodeBin *dbin;
 
+  if ((GST_PAD_PROBE_INFO_TYPE (info) & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) &&
+      (GST_EVENT_IS_STICKY (GST_PAD_PROBE_INFO_EVENT (info))
+          || !GST_EVENT_IS_SERIALIZED (GST_PAD_PROBE_INFO_EVENT (info)))) {
+    /* do not block on sticky or out of band events otherwise the allocation query
+       from demuxer might block the loop thread */
+    return GST_PAD_PROBE_PASS;
+  }
+
   chain = dpad->chain;
   dbin = chain->dbin;
 



More information about the gstreamer-commits mailing list