Skip to content
Snippets Groups Projects
Commit 31597fcd authored by George Kiagiadakis's avatar George Kiagiadakis Committed by Tim-Philipp Müller
Browse files

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
parent c72ba7e3
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment