mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-06-09 01:29:28 +00:00
fix proxying elements to query peer caps and not their own ones
Original commit message from CVS: fix proxying elements to query peer caps and not their own ones
This commit is contained in:
parent
b2bf8cc44a
commit
91b84eb539
|
@ -254,16 +254,20 @@ gst_spider_identity_getcaps (GstPad *pad)
|
|||
{
|
||||
GstSpiderIdentity *spider_identity = GST_SPIDER_IDENTITY (gst_pad_get_parent (pad));
|
||||
GstPad *otherpad;
|
||||
GstPad *peer;
|
||||
|
||||
if (pad == spider_identity->src)
|
||||
otherpad = spider_identity->sink;
|
||||
else
|
||||
otherpad = spider_identity->src;
|
||||
|
||||
if (otherpad != NULL)
|
||||
return gst_pad_get_allowed_caps (otherpad);
|
||||
|
||||
return NULL;
|
||||
if (otherpad != NULL) {
|
||||
peer = GST_PAD_PEER (otherpad);
|
||||
|
||||
if (peer)
|
||||
return gst_pad_get_caps (peer);
|
||||
}
|
||||
return gst_caps2_new_any ();
|
||||
}
|
||||
|
||||
GstPad*
|
||||
|
|
|
@ -167,6 +167,7 @@ gst_identity_getcaps (GstPad *pad)
|
|||
{
|
||||
GstIdentity *identity;
|
||||
GstPad *otherpad;
|
||||
GstPad *peer;
|
||||
|
||||
identity = GST_IDENTITY (gst_pad_get_parent (pad));
|
||||
|
||||
|
@ -175,8 +176,13 @@ gst_identity_getcaps (GstPad *pad)
|
|||
}
|
||||
|
||||
otherpad = (pad == identity->srcpad ? identity->sinkpad : identity->srcpad);
|
||||
peer = GST_PAD_PEER (otherpad);
|
||||
|
||||
return gst_caps2_copy (gst_pad_get_allowed_caps (otherpad));
|
||||
if (peer) {
|
||||
return gst_pad_get_caps (peer);
|
||||
} else {
|
||||
return gst_caps2_new_any ();
|
||||
}
|
||||
}
|
||||
|
||||
static GstPadLinkReturn
|
||||
|
|
|
@ -167,6 +167,7 @@ gst_identity_getcaps (GstPad *pad)
|
|||
{
|
||||
GstIdentity *identity;
|
||||
GstPad *otherpad;
|
||||
GstPad *peer;
|
||||
|
||||
identity = GST_IDENTITY (gst_pad_get_parent (pad));
|
||||
|
||||
|
@ -175,8 +176,13 @@ gst_identity_getcaps (GstPad *pad)
|
|||
}
|
||||
|
||||
otherpad = (pad == identity->srcpad ? identity->sinkpad : identity->srcpad);
|
||||
peer = GST_PAD_PEER (otherpad);
|
||||
|
||||
return gst_caps2_copy (gst_pad_get_allowed_caps (otherpad));
|
||||
if (peer) {
|
||||
return gst_pad_get_caps (peer);
|
||||
} else {
|
||||
return gst_caps2_new_any ();
|
||||
}
|
||||
}
|
||||
|
||||
static GstPadLinkReturn
|
||||
|
|
Loading…
Reference in a new issue