mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-27 11:32:51 +00:00
ghostpad: Make sure that nobody sets the proxypad or ghostpad itself as target
Doing this will lead to very interesting crashes, like stack overflows.
This commit is contained in:
parent
f425b2711f
commit
6042793c26
1 changed files with 2 additions and 0 deletions
|
@ -1182,6 +1182,8 @@ gst_ghost_pad_set_target (GstGhostPad * gpad, GstPad * newtarget)
|
|||
GstPadLinkReturn lret;
|
||||
|
||||
g_return_val_if_fail (GST_IS_GHOST_PAD (gpad), FALSE);
|
||||
g_return_val_if_fail (GST_PAD_CAST (gpad) != newtarget, FALSE);
|
||||
g_return_val_if_fail (newtarget != GST_PROXY_PAD_INTERNAL (gpad), FALSE);
|
||||
|
||||
/* no need for locking, the internal pad's lifecycle is directly linked to the
|
||||
* ghostpad's */
|
||||
|
|
Loading…
Reference in a new issue