mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
GstPad: relax failure to deactivate unlinked pads
When de/activating a pad in pull mode the pad needs to de/activate the peer pad it is connected to, failure to be able to do this in activation mode is an error. However if there is no peerpad, we can still deactivate the pad correctly and assume the application will deactivate the unlinked peer pad eventually. Fixes #574163.
This commit is contained in:
parent
e13168bd4b
commit
fe2f12b162
1 changed files with 7 additions and 1 deletions
|
@ -767,7 +767,13 @@ gst_pad_activate_pull (GstPad * pad, gboolean active)
|
|||
goto peer_failed;
|
||||
gst_object_unref (peer);
|
||||
} else {
|
||||
goto not_linked;
|
||||
/* there is no peer, this is only fatal when we activate. When we
|
||||
* deactivate, we must assume the application has unlinked the peer and
|
||||
* will deactivate it eventually. */
|
||||
if (active)
|
||||
goto not_linked;
|
||||
else
|
||||
GST_DEBUG_OBJECT (pad, "deactivating unlinked pad");
|
||||
}
|
||||
} else {
|
||||
if (G_UNLIKELY (GST_PAD_GETRANGEFUNC (pad) == NULL))
|
||||
|
|
Loading…
Reference in a new issue