From b8431a03a7e1388028b03f01678657bee8b36bc1 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Mon, 28 Nov 2011 13:08:27 +0000 Subject: [PATCH] various: fix pad template ref leaks https://bugzilla.gnome.org/show_bug.cgi?id=662664 --- ext/opus/gstopusdec.c | 8 ++++---- ext/opus/gstopusenc.c | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ext/opus/gstopusdec.c b/ext/opus/gstopusdec.c index 89639b12b8..585b38335e 100644 --- a/ext/opus/gstopusdec.c +++ b/ext/opus/gstopusdec.c @@ -103,10 +103,10 @@ gst_opus_dec_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&opus_dec_src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&opus_dec_sink_factory)); + gst_element_class_add_static_pad_template (element_class, + &opus_dec_src_factory); + gst_element_class_add_static_pad_template (element_class, + &opus_dec_sink_factory); gst_element_class_set_details_simple (element_class, "Opus audio decoder", "Codec/Decoder/Audio", "decode opus streams to audio", diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c index 8ca1158c99..f747a37362 100644 --- a/ext/opus/gstopusenc.c +++ b/ext/opus/gstopusenc.c @@ -204,10 +204,8 @@ gst_opus_enc_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&src_factory)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&sink_factory)); + gst_element_class_add_static_pad_template (element_class, &src_factory); + gst_element_class_add_static_pad_template (element_class, &sink_factory); gst_element_class_set_details_simple (element_class, "Opus audio encoder", "Codec/Encoder/Audio", "Encodes audio in Opus format",