mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 22:01:27 +00:00
ghostpad: use gst_pad_get_peer to acquire a reference to the target pad
This ensures that the lock of the internal pad is held while referencing it's peer (= the target pad), which ensures that the peer is not going to be unlinked/destroyed in the meantime. https://bugzilla.gnome.org/show_bug.cgi?id=725809
This commit is contained in:
parent
c72ba7e3d9
commit
31597fcd68
1 changed files with 1 additions and 3 deletions
|
@ -195,9 +195,7 @@ gst_proxy_pad_get_target (GstPad * pad)
|
|||
GstPad *target;
|
||||
|
||||
GST_OBJECT_LOCK (pad);
|
||||
target = GST_PROXY_PAD_TARGET (pad);
|
||||
if (target)
|
||||
gst_object_ref (target);
|
||||
target = gst_pad_get_peer (GST_PROXY_PAD_INTERNAL (pad));
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
|
||||
return target;
|
||||
|
|
Loading…
Reference in a new issue