We need to ensure we call gst_pad_check_link() with the two pads in the correct
order. The order depends on wheter we iterate src or sink pads.
Signed-off-by: Chen Rui <rui.chen@tieto.com>
{
GstPad *peer;
GstPad *current;
+ GstPad *srcpad;
+ GstPad *sinkpad;
current = GST_PAD (padptr);
GST_CAT_LOG (GST_CAT_ELEMENT_PADS, "examining pad %s:%s",
GST_DEBUG_PAD_NAME (current));
+ if (GST_PAD_IS_SRC (current)) {
+ srcpad = current;
+ sinkpad = pad;
+ } else {
+ srcpad = pad;
+ sinkpad = current;
+ }
peer = gst_pad_get_peer (current);
- if (peer == NULL && gst_pad_check_link (pad, current)) {
+ if (peer == NULL && gst_pad_check_link (srcpad, sinkpad)) {
GstCaps *temp, *intersection;
gboolean compatible;