gst/gstelement.c: check for empty intersection instead of NULL caps remove old workar...
authorBenjamin Otte <otte@gnome.org>
Fri, 5 Mar 2004 21:44:36 +0000 (21:44 +0000)
committerBenjamin Otte <otte@gnome.org>
Fri, 5 Mar 2004 21:44:36 +0000 (21:44 +0000)
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
common
gst/gstelement.c

index a2880cf..39bbdae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-03-05  Benjamin Otte  <otte@gnome.org>
+
+       * 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  <thomas at apestaart dot org>
 
        * gst/gstelement.c: (gst_element_error_full):
diff --git a/common b/common
index 874dab5..4eb0271 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 874dab5c3461ad7487f1ae029256b6da82dddf6d
+Subproject commit 4eb02711e49a6aadf900d6fd9d220c17115fec2a
index 09a4255..4d759e4 100644 (file)
@@ -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));