From: Benjamin O. <co...@us...> - 2003-12-17 05:16:24
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: company Date: Tue Dec 16 2003 21:16:23 PST Branch: CAPS Log message: fix proxying elements to query peer caps and not their own ones Modified files: gst/autoplug : gstspideridentity.c gst/elements : gstidentity.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/autoplug/gstspideridentity.c.diff?r1=1.44.2.4&r2=1.44.2.5 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/elements/gstidentity.c.diff?r1=1.47.2.3&r2=1.47.2.4 ====Begin Diffs==== Index: gstidentity.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/elements/gstidentity.c,v retrieving revision 1.47.2.3 retrieving revision 1.47.2.4 diff -u -d -r1.47.2.3 -r1.47.2.4 --- gstidentity.c 2 Dec 2003 18:45:09 -0000 1.47.2.3 +++ gstidentity.c 17 Dec 2003 05:16:11 -0000 1.47.2.4 @@ -167,6 +167,7 @@ { GstIdentity *identity; GstPad *otherpad; + GstPad *peer; identity = GST_IDENTITY (gst_pad_get_parent (pad)); @@ -175,8 +176,13 @@ } 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 Index: gstspideridentity.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/autoplug/gstspideridentity.c,v retrieving revision 1.44.2.4 retrieving revision 1.44.2.5 diff -u -d -r1.44.2.4 -r1.44.2.5 --- gstspideridentity.c 11 Dec 2003 05:35:28 -0000 1.44.2.4 +++ gstspideridentity.c 17 Dec 2003 05:16:11 -0000 1.44.2.5 @@ -254,16 +254,20 @@ { 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* |