mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 05:28:48 +00:00
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:
parent
2df213fe25
commit
8a0bdbf2bc
2 changed files with 4 additions and 4 deletions
|
@ -185,7 +185,7 @@ gst_audio_filter_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gst_audio_filter_class_add_pad_templates (GstAudioFilterClass * klass,
|
gst_audio_filter_class_add_pad_templates (GstAudioFilterClass * klass,
|
||||||
const GstCaps * allowed_caps)
|
GstCaps * allowed_caps)
|
||||||
{
|
{
|
||||||
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
|
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
|
||||||
GstPadTemplate *pad_template;
|
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));
|
g_return_if_fail (GST_IS_CAPS (allowed_caps));
|
||||||
|
|
||||||
pad_template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
|
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);
|
gst_element_class_add_pad_template (element_class, pad_template);
|
||||||
|
|
||||||
pad_template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
|
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);
|
gst_element_class_add_pad_template (element_class, pad_template);
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ struct _GstAudioFilterClass {
|
||||||
GType gst_audio_filter_get_type (void);
|
GType gst_audio_filter_get_type (void);
|
||||||
|
|
||||||
void gst_audio_filter_class_add_pad_templates (GstAudioFilterClass * klass,
|
void gst_audio_filter_class_add_pad_templates (GstAudioFilterClass * klass,
|
||||||
const GstCaps * allowed_caps);
|
GstCaps * allowed_caps);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue