mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
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.
This commit is contained in:
parent
3b842bc98b
commit
45447337ad
1 changed files with 9 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue