gst_plugins_base/gst-libs/gst/audio/gstaudiofilter.c
branchRCL_3
changeset 29 567bb019e3e3
parent 0 0e761a78d257
child 30 7e817e7e631c
--- a/gst_plugins_base/gst-libs/gst/audio/gstaudiofilter.c	Wed Mar 31 22:03:18 2010 +0300
+++ b/gst_plugins_base/gst-libs/gst/audio/gstaudiofilter.c	Tue Aug 31 15:30:33 2010 +0300
@@ -32,13 +32,14 @@
  * their base_init function to easily configure the set of caps/formats that
  * the element is able to handle.
  *
- * Derived classes should override the GstAudioFilter::setup() and
- * GstBaseTransform::transform_ip() and/or GstBaseTransform::transform()
+ * Derived classes should override the #GstAudioFilterClass.setup() and
+ * #GstBaseTransformClass.transform_ip() and/or
+ * #GstBaseTransformClass.transform()
  * virtual functions in their class_init function.
  *
- * Since: 0.10.12
+ * Last reviewed on 2007-02-03 (0.10.11.1)
  *
- * Last reviewed on 2007-02-03 (0.10.11.1)
+ * Since: 0.10.12
  */
 
 #ifdef HAVE_CONFIG_H
@@ -168,8 +169,6 @@
   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);
@@ -227,16 +226,19 @@
     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));
 
-  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 ("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 ("sink", GST_PAD_SINK, 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);
 }