validate: Fix going over ghostpads/proxypads

This commit is contained in:
Thibault Saunier 2017-08-10 19:25:09 -04:00
parent 6b661f394f
commit 7be8ecd628

View file

@ -186,13 +186,13 @@ _get_peer_pad (GstPad * pad)
while (GST_IS_PROXY_PAD (peer)) { while (GST_IS_PROXY_PAD (peer)) {
GstPad *next_pad; GstPad *next_pad;
if (GST_IS_GHOST_PAD (peer)) { if (GST_PAD_IS_SINK (peer)) {
next_pad = gst_pad_get_peer (peer); if (GST_IS_GHOST_PAD (peer))
if (next_pad == pad)
next_pad = gst_ghost_pad_get_target (GST_GHOST_PAD (peer)); next_pad = gst_ghost_pad_get_target (GST_GHOST_PAD (peer));
else
next_pad = GST_PAD (gst_proxy_pad_get_internal (GST_PROXY_PAD (peer)));
} else { } else {
next_pad = GST_PAD (gst_proxy_pad_get_internal (GST_PROXY_PAD (peer))); next_pad = gst_pad_get_peer (peer);
} }
if (!next_pad) if (!next_pad)