diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2010-01-14 18:26:03 +0100 |
---|---|---|
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2010-01-14 18:26:03 +0100 |
commit | 45447337ad7189ade81226064b36eff172673c79 (patch) | |
tree | 5b2001cbba4ac783ffe21985a72cc7e867c8fc3c | |
parent | 3b842bc98b73a568f0fab91624b9549c415e16ba (diff) |
decodebin2: mind blocked pads when shutting down
Fix regression in shutdown deadlock handling now that the
target of a ghostpad is blocked instead of ghostpad itself.
See also #574293.
-rw-r--r-- | gst/playback/gstdecodebin2.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 95cc645f..470ddc4b 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -3164,14 +3164,20 @@ gst_decode_pad_set_blocked (GstDecodePad * dpad, gboolean blocked) if (!opad) goto out; - gst_pad_set_blocked_async_full (opad, blocked, - (GstPadBlockCallback) source_pad_blocked_cb, gst_object_ref (dpad), - (GDestroyNotify) gst_object_unref); + /* do not block if shutting down. + * we do not consider/expect it blocked further below, but use other trick */ + if (!blocked || !dbin->shutdown) + gst_pad_set_blocked_async_full (opad, blocked, + (GstPadBlockCallback) source_pad_blocked_cb, gst_object_ref (dpad), + (GDestroyNotify) gst_object_unref); if (blocked) { if (dbin->shutdown) { /* deactivate to force flushing state to prevent NOT_LINKED errors */ gst_pad_set_active (GST_PAD_CAST (dpad), FALSE); + /* note that deactivating the target pad would have no effect here, + * since elements are typically connected first (and pads exposed), + * and only then brought to PAUSED state (so pads activated) */ } else { gst_object_ref (dpad); dbin->blocked_pads = g_list_prepend (dbin->blocked_pads, dpad); |