mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
multiqueue: Ensure peer pad exists when iterating internal links
The pads can be NULL when we're racing with pad removal, e.g. when the pads get removed between `gst_pad_iterate_internal_links` acquiring the parent element and `gst_multi_queue_iterate_internal_links` locking the multiqueue. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/810>
This commit is contained in:
parent
b48e32ab00
commit
4ad1c8b7c9
1 changed files with 2 additions and 2 deletions
|
@ -1144,11 +1144,11 @@ gst_multi_queue_iterate_internal_links (GstPad * pad, GstObject * parent)
|
||||||
|
|
||||||
srcpad = g_weak_ref_get (&squeue->srcpad);
|
srcpad = g_weak_ref_get (&squeue->srcpad);
|
||||||
sinkpad = g_weak_ref_get (&squeue->sinkpad);
|
sinkpad = g_weak_ref_get (&squeue->sinkpad);
|
||||||
if (sinkpad == pad) {
|
if (sinkpad == pad && srcpad) {
|
||||||
opad = srcpad;
|
opad = srcpad;
|
||||||
gst_clear_object (&sinkpad);
|
gst_clear_object (&sinkpad);
|
||||||
|
|
||||||
} else if (srcpad == pad) {
|
} else if (srcpad == pad && sinkpad) {
|
||||||
opad = sinkpad;
|
opad = sinkpad;
|
||||||
gst_clear_object (&srcpad);
|
gst_clear_object (&srcpad);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue