diff options
author | Vincent Penquerc'h | 2011-11-28 07:08:27 -0600 |
---|---|---|
committer | Vincent Penquerc'h | 2011-11-28 07:08:27 -0600 |
commit | 7521b597f4dc49d8d168f368f0e7ebaf98a72156 (patch) | |
tree | 0033ba79e1bf8add58e1dcecffa95f73010bbd10 /tests | |
parent | 26d6add9457f00ce8ec13844368466f0e3816e5d (diff) | |
download | gst-plugins-bad0-10-7521b597f4dc49d8d168f368f0e7ebaf98a72156.tar.gz gst-plugins-bad0-10-7521b597f4dc49d8d168f368f0e7ebaf98a72156.tar.xz gst-plugins-bad0-10-7521b597f4dc49d8d168f368f0e7ebaf98a72156.zip |
various: fix pad template ref leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/elements/autoconvert.c | 16 | ||||
-rw-r--r-- | tests/check/elements/baseaudiovisualizer.c | 8 |
2 files changed, 8 insertions, 16 deletions
diff --git a/tests/check/elements/autoconvert.c b/tests/check/elements/autoconvert.c index 037795378..f341a9944 100644 --- a/tests/check/elements/autoconvert.c +++ b/tests/check/elements/autoconvert.c | |||
@@ -206,13 +206,9 @@ static void | |||
206 | test_element1_class_init (TestElement1Class * klass) | 206 | test_element1_class_init (TestElement1Class * klass) |
207 | { | 207 | { |
208 | GstElementClass *element_class = GST_ELEMENT_CLASS (klass); | 208 | GstElementClass *element_class = GST_ELEMENT_CLASS (klass); |
209 | GstPadTemplate *src_template, *sink_template; | ||
210 | 209 | ||
211 | src_template = gst_static_pad_template_get (&src_factory); | 210 | gst_element_class_add_static_pad_template (element_class, &src_factory); |
212 | gst_element_class_add_pad_template (element_class, src_template); | 211 | gst_element_class_add_static_pad_template (element_class, &sink_factory); |
213 | |||
214 | sink_template = gst_static_pad_template_get (&sink_factory); | ||
215 | gst_element_class_add_pad_template (element_class, sink_template); | ||
216 | } | 212 | } |
217 | 213 | ||
218 | static void | 214 | static void |
@@ -225,13 +221,9 @@ static void | |||
225 | test_element2_class_init (TestElement2Class * klass) | 221 | test_element2_class_init (TestElement2Class * klass) |
226 | { | 222 | { |
227 | GstElementClass *element_class = GST_ELEMENT_CLASS (klass); | 223 | GstElementClass *element_class = GST_ELEMENT_CLASS (klass); |
228 | GstPadTemplate *src_template, *sink_template; | ||
229 | |||
230 | src_template = gst_static_pad_template_get (&src_factory); | ||
231 | gst_element_class_add_pad_template (element_class, src_template); | ||
232 | 224 | ||
233 | sink_template = gst_static_pad_template_get (&sink_factory); | 225 | gst_element_class_add_static_pad_template (element_class, &src_factory); |
234 | gst_element_class_add_pad_template (element_class, sink_template); | 226 | gst_element_class_add_static_pad_template (element_class, &sink_factory); |
235 | } | 227 | } |
236 | 228 | ||
237 | static void | 229 | static void |
diff --git a/tests/check/elements/baseaudiovisualizer.c b/tests/check/elements/baseaudiovisualizer.c index 8b97665a3..f06b53d04 100644 --- a/tests/check/elements/baseaudiovisualizer.c +++ b/tests/check/elements/baseaudiovisualizer.c | |||
@@ -72,10 +72,10 @@ gst_test_scope_base_init (gpointer g_class) | |||
72 | "Visualization", | 72 | "Visualization", |
73 | "Dummy test scope", "Stefan Kost <ensonic@users.sf.net>"); | 73 | "Dummy test scope", "Stefan Kost <ensonic@users.sf.net>"); |
74 | 74 | ||
75 | gst_element_class_add_pad_template (element_class, | 75 | gst_element_class_add_static_pad_template (element_class, |
76 | gst_static_pad_template_get (&gst_test_scope_src_template)); | 76 | &gst_test_scope_src_template); |
77 | gst_element_class_add_pad_template (element_class, | 77 | gst_element_class_add_static_pad_template (element_class, |
78 | gst_static_pad_template_get (&gst_test_scope_sink_template)); | 78 | &gst_test_scope_sink_template); |
79 | } | 79 | } |
80 | 80 | ||
81 | static void | 81 | static void |