From 1f51fd9785945f1b33c3464af363b42e445d32f3 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 24 Jan 2007 12:26:41 +0000 Subject: gst/rtsp/gstrtspsrc.c: Unblock pads after adding the pads to the element so that autopluggers get a change to link so... Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (pad_unblocked), (pad_blocked): Unblock pads after adding the pads to the element so that autopluggers get a change to link something. Possibly fixes #395688. --- ChangeLog | 6 ++++++ gst/rtsp/gstrtspsrc.c | 11 +++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4397b03f..c04ba488 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-01-24 Wim Taymans + + * gst/rtsp/gstrtspsrc.c: (pad_unblocked), (pad_blocked): + Unblock pads after adding the pads to the element so that autopluggers + get a change to link something. Possibly fixes #395688. + 2007-01-24 Wim Taymans * gst/rtp/gstrtpamrdepay.c: diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 96fd79ee..b56265cc 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -841,6 +841,7 @@ cleanup: static void pad_unblocked (GstPad * pad, gboolean blocked, GstRTSPSrc * src) { + GST_DEBUG_OBJECT (src, "pad %s:%s unblocked", GST_DEBUG_PAD_NAME (pad)); } static void @@ -849,9 +850,6 @@ pad_blocked (GstPad * pad, gboolean blocked, GstRTSPSrc * src) GST_DEBUG_OBJECT (src, "pad %s:%s blocked, activating streams", GST_DEBUG_PAD_NAME (pad)); - gst_pad_set_blocked_async (pad, FALSE, (GstPadBlockCallback) pad_unblocked, - src); - /* activate the streams */ GST_OBJECT_LOCK (src); if (!src->need_activate) @@ -862,12 +860,17 @@ pad_blocked (GstPad * pad, gboolean blocked, GstRTSPSrc * src) gst_rtspsrc_activate_streams (src); +unblock: + /* now unblock and let it stream */ + gst_pad_set_blocked_async (pad, FALSE, (GstPadBlockCallback) pad_unblocked, + src); + return; was_ok: { GST_OBJECT_UNLOCK (src); - return; + goto unblock; } } -- cgit