diff -r 567bb019e3e3 -r 7e817e7e631c gst_plugins_base/gst-libs/gst/audio/gstaudiofilter.c --- a/gst_plugins_base/gst-libs/gst/audio/gstaudiofilter.c Tue Aug 31 15:30:33 2010 +0300 +++ b/gst_plugins_base/gst-libs/gst/audio/gstaudiofilter.c Wed Sep 01 12:16:41 2010 +0100 @@ -32,14 +32,13 @@ * their base_init function to easily configure the set of caps/formats that * the element is able to handle. * - * Derived classes should override the #GstAudioFilterClass.setup() and - * #GstBaseTransformClass.transform_ip() and/or - * #GstBaseTransformClass.transform() + * Derived classes should override the GstAudioFilter::setup() and + * GstBaseTransform::transform_ip() and/or GstBaseTransform::transform() * virtual functions in their class_init function. * - * Last reviewed on 2007-02-03 (0.10.11.1) + * Since: 0.10.12 * - * Since: 0.10.12 + * Last reviewed on 2007-02-03 (0.10.11.1) */ #ifdef HAVE_CONFIG_H @@ -169,6 +168,8 @@ GstAudioFilter *filter; gboolean ret = TRUE; + g_assert (gst_caps_is_equal (incaps, outcaps)); + filter = GST_AUDIO_FILTER (btrans); GST_LOG_OBJECT (filter, "caps: %" GST_PTR_FORMAT, incaps); @@ -226,19 +227,16 @@ const GstCaps * allowed_caps) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - GstPadTemplate *pad_template; g_return_if_fail (GST_IS_AUDIO_FILTER_CLASS (klass)); g_return_if_fail (allowed_caps != NULL); g_return_if_fail (GST_IS_CAPS (allowed_caps)); - pad_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - gst_caps_copy (allowed_caps)); - gst_element_class_add_pad_template (element_class, pad_template); - gst_object_unref (pad_template); + gst_element_class_add_pad_template (element_class, + gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, + gst_caps_copy (allowed_caps))); - pad_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - gst_caps_copy (allowed_caps)); - gst_element_class_add_pad_template (element_class, pad_template); - gst_object_unref (pad_template); + gst_element_class_add_pad_template (element_class, + gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, + gst_caps_copy (allowed_caps))); }