From a426305315f20d1935fda5118d8069abab66d104 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 5 Mar 2004 21:44:36 +0000 Subject: [PATCH] gst/gstelement.c: check for empty intersection instead of NULL caps remove old workaround that is only a bug nowadays Original commit message from CVS: * gst/gstelement.c: (gst_element_get_compatible_pad_template): check for empty intersection instead of NULL caps (gst_element_get_compatible_pad_filtered): remove old workaround that is only a bug nowadays --- ChangeLog | 7 +++++++ common | 2 +- gst/gstelement.c | 15 +-------------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index a2880cf248..39bbdaed68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-03-05 Benjamin Otte + + * gst/gstelement.c: (gst_element_get_compatible_pad_template): + check for empty intersection instead of NULL caps + (gst_element_get_compatible_pad_filtered): + remove old workaround that is only a bug nowadays + 2004-03-05 Thomas Vander Stichele * gst/gstelement.c: (gst_element_error_full): diff --git a/common b/common index 874dab5c34..4eb02711e4 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 874dab5c3461ad7487f1ae029256b6da82dddf6d +Subproject commit 4eb02711e49a6aadf900d6fd9d220c17115fec2a diff --git a/gst/gstelement.c b/gst/gstelement.c index 09a4255f75..4d759e4d08 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -1521,7 +1521,7 @@ gst_element_get_compatible_pad_template (GstElement *element, GST_CAT_DEBUG (GST_CAT_CAPS, "caps are %scompatible", (intersection ? "" : "not ")); - if (intersection) + if (!gst_caps_is_empty (intersection)) newtempl = padtempl; gst_caps_free (intersection); if (newtempl) break; @@ -1666,19 +1666,6 @@ gst_element_get_compatible_pad_filtered (GstElement *element, GstPad *pad, if (foundpad) return foundpad; - /* FIXME: this is broken, but it's in here so autoplugging elements - * that don't have caps on their source padtemplates (spider) can - * link... */ - //g_warning("got here"); - //if (filtercaps == NULL) { - templ = gst_pad_template_new ((gchar *) GST_PAD_NAME (pad), - GST_PAD_DIRECTION (pad), GST_PAD_ALWAYS, gst_caps_new_any()); - foundpad = gst_element_request_compatible_pad (element, templ); - gst_object_unref (GST_OBJECT (templ)); - - if (foundpad) return foundpad; - //} - GST_CAT_INFO_OBJECT (GST_CAT_ELEMENT_PADS, element, "Could not find a compatible pad to link to %s:%s", GST_DEBUG_PAD_NAME (pad));