summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/check/elements/matroskamux.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/check/elements/matroskamux.c b/tests/check/elements/matroskamux.c
index 8b31014e..30bf09f1 100644
--- a/tests/check/elements/matroskamux.c
+++ b/tests/check/elements/matroskamux.c
@@ -56,15 +56,16 @@ static GstStaticPadTemplate srcac3template = GST_STATIC_PAD_TEMPLATE ("src",
GstPad *
setup_src_pad (GstElement * element,
- GstStaticPadTemplate * srctemplate, GstCaps * caps)
+ GstStaticPadTemplate * template, GstCaps * caps)
{
GstPad *srcpad, *sinkpad;
+ GstPadTemplate *templ;
GST_DEBUG_OBJECT (element, "setting up sending pad");
/* sending pad */
- srcpad =
- gst_pad_new_from_template (gst_static_pad_template_get (srctemplate),
- "src");
+ templ = gst_static_pad_template_get (template);
+ srcpad = gst_pad_new_from_template (templ, "src");
+ gst_object_unref (templ);
fail_if (srcpad == NULL, "Could not create a srcpad");
ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1);
@@ -110,12 +111,14 @@ setup_sink_pad (GstElement * element, GstStaticPadTemplate * template,
GstCaps * caps)
{
GstPad *srcpad, *sinkpad;
+ GstPadTemplate *templ;
GST_DEBUG_OBJECT (element, "setting up receiving pad");
/* receiving pad */
- sinkpad =
- gst_pad_new_from_template (gst_static_pad_template_get (template),
- "sink");
+ templ = gst_static_pad_template_get (template);
+ sinkpad = gst_pad_new_from_template (templ, "sink");
+ gst_object_unref (templ);
+
fail_if (sinkpad == NULL, "Could not create a sinkpad");
srcpad = gst_element_get_pad (element, "src");