From 8a0bdbf2bcbb15fb2dd774fd270bd052c256b76c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 17 May 2011 12:29:24 +0200 Subject: [PATCH] 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. --- gst-libs/gst/audio/gstaudiofilter.c | 6 +++--- gst-libs/gst/audio/gstaudiofilter.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gst-libs/gst/audio/gstaudiofilter.c b/gst-libs/gst/audio/gstaudiofilter.c index 3fe641be47..fe6ad8a8f0 100644 --- a/gst-libs/gst/audio/gstaudiofilter.c +++ b/gst-libs/gst/audio/gstaudiofilter.c @@ -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); } diff --git a/gst-libs/gst/audio/gstaudiofilter.h b/gst-libs/gst/audio/gstaudiofilter.h index c311c9790d..0b30aabce0 100644 --- a/gst-libs/gst/audio/gstaudiofilter.h +++ b/gst-libs/gst/audio/gstaudiofilter.h @@ -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