mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
sctp: Ensure pad is still a child of element before removal
During pipeline shutdown there are several competing paths to remove pads. Avoids tests failing due to: Unexpected critical/warning: Padname '':sink_1 does not belong to element sctpenc1 when removing Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2256>
This commit is contained in:
parent
5663db236f
commit
be1c154f33
1 changed files with 4 additions and 1 deletions
|
@ -483,7 +483,10 @@ gst_sctp_enc_release_pad (GstElement * element, GstPad * pad)
|
|||
if (self->sctp_association)
|
||||
gst_sctp_association_reset_stream (self->sctp_association, stream_id);
|
||||
|
||||
gst_element_remove_pad (element, pad);
|
||||
GST_PAD_STREAM_LOCK (pad);
|
||||
if (gst_object_has_as_parent (GST_OBJECT (pad), GST_OBJECT (element)))
|
||||
gst_element_remove_pad (element, pad);
|
||||
GST_PAD_STREAM_UNLOCK (pad);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue