From b99693171e30add1520e10178bb4c2549200cd27 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 4 Feb 2005 15:36:37 +0000 Subject: [PATCH] gst/gstelement.c (gst_element_get_compatible_pad_template): Fix the debugging on whether the caps are compatible. Original commit message from CVS: 2005-02-04 Andy Wingo * gst/gstelement.c (gst_element_get_compatible_pad_template): Fix the debugging on whether the caps are compatible. --- ChangeLog | 5 +++++ gst/gstelement.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 24c1bb9..6d0b7a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-02-04 Andy Wingo + + * gst/gstelement.c (gst_element_get_compatible_pad_template): Fix + the debugging on whether the caps are compatible. + 2005-02-03 Ronald S. Bultje * docs/manual/basics-elements.xml: diff --git a/gst/gstelement.c b/gst/gstelement.c index cec465a..f9b1e2b 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -1657,6 +1657,8 @@ gst_element_get_compatible_pad_template (GstElement * element, GST_CAT_LOG (GST_CAT_CAPS, "checking pad template %s", padtempl->name_template); if (padtempl->direction != compattempl->direction) { + gboolean is_empty; + GST_CAT_DEBUG (GST_CAT_CAPS, "compatible direction: found %s pad template \"%s\"", padtempl->direction == GST_PAD_SRC ? "src" : "sink", @@ -1665,10 +1667,12 @@ gst_element_get_compatible_pad_template (GstElement * element, intersection = gst_caps_intersect (GST_PAD_TEMPLATE_CAPS (compattempl), GST_PAD_TEMPLATE_CAPS (padtempl)); + is_empty = gst_caps_is_empty (intersection); + GST_CAT_DEBUG (GST_CAT_CAPS, "caps are %scompatible", - (intersection ? "" : "not ")); + is_empty ? "not " : ""); - if (!gst_caps_is_empty (intersection)) + if (!is_empty) newtempl = padtempl; gst_caps_free (intersection); if (newtempl) -- 2.7.4