mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
utils: return real error in compatible link check
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>
This commit is contained in:
parent
12d2d01663
commit
b164a8232a
1 changed files with 10 additions and 1 deletions
|
@ -1117,15 +1117,24 @@ gst_element_get_compatible_pad (GstElement * element, GstPad * pad,
|
|||
{
|
||||
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue