From b719dd9f89e8b00c28262a6a4a73cb83720ea0e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 6 May 2013 15:47:34 +0200 Subject: [PATCH] decodebin: Expose pads when they receive EOS before any buffers Stops decodebin from waiting forever to expose a pad if there is never data on it. https://bugzilla.gnome.org/show_bug.cgi?id=691072 --- gst/playback/gstdecodebin2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 0e5e1fc907..78da6d62a4 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -4083,9 +4083,11 @@ source_pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) return GST_PAD_PROBE_PASS; } - if (GST_EVENT_IS_STICKY (event)) { + if (GST_EVENT_IS_STICKY (event) && GST_EVENT_TYPE (event) != GST_EVENT_EOS) { /* manually push sticky events to ghost pad to avoid exposing pads - * that don't have the sticky events */ + * that don't have the sticky events. Handle EOS separately as we + * want to block the pad on it if we didn't get any buffers before + * EOS and expose the pad then. */ gst_pad_push_event (GST_PAD_CAST (dpad), gst_event_ref (event)); /* let the sticky events pass */