audiofilter: gst_pad_template_new() does not take ownership of the caps anymore

There's no need to copy the caps before passing them to that function.
This commit is contained in:
Sebastian Dröge 2011-05-17 12:29:24 +02:00
parent 2df213fe25
commit 8a0bdbf2bc
2 changed files with 4 additions and 4 deletions

View file

@ -185,7 +185,7 @@ gst_audio_filter_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
*/
void
gst_audio_filter_class_add_pad_templates (GstAudioFilterClass * klass,
const GstCaps * allowed_caps)
GstCaps * allowed_caps)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
GstPadTemplate *pad_template;
@ -194,10 +194,10 @@ gst_audio_filter_class_add_pad_templates (GstAudioFilterClass * klass,
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));
allowed_caps);
gst_element_class_add_pad_template (element_class, pad_template);
pad_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
gst_caps_copy (allowed_caps));
allowed_caps);
gst_element_class_add_pad_template (element_class, pad_template);
}

View file

@ -88,7 +88,7 @@ struct _GstAudioFilterClass {
GType gst_audio_filter_get_type (void);
void gst_audio_filter_class_add_pad_templates (GstAudioFilterClass * klass,
const GstCaps * allowed_caps);
GstCaps * allowed_caps);
G_END_DECLS