Commit c9917a1a authored by Stefan Kost's avatar Stefan Kost
Browse files

tests: remove the hacks to workaround the pad-leak

parent 8892f3f4
......@@ -945,11 +945,6 @@ gst_element_get_compatible_pad (GstElement * element, GstPad * pad,
templ = gst_pad_template_new ((gchar *) GST_PAD_NAME (pad),
GST_PAD_DIRECTION (pad), GST_PAD_ALWAYS, templcaps);
/* FIXME : Because of a bug in gst_pad_template_new() by which is does not
* properly steal the refcount of the given caps, we have to unref these caps
* REVERT THIS WHEN FIXED !*/
gst_caps_unref (templcaps);
foundpad = gst_element_request_compatible_pad (element, templ);
gst_object_unref (templ);
......
......@@ -612,13 +612,6 @@ GST_START_TEST (test_ghost_pads_new_from_template)
ghosttempl = gst_pad_template_new ("ghosttempl", GST_PAD_SINK,
GST_PAD_ALWAYS, ghostcaps);
/* FIXME : We should not have to unref those caps, but due to
* a bug in gst_pad_template_new() not stealing the refcount of
* the given caps we have to. */
gst_caps_unref (ghostcaps);
gst_caps_unref (copypadcaps);
sinkpad = gst_pad_new_from_template (padtempl, "sinkpad");
fail_unless (sinkpad != NULL);
......@@ -665,12 +658,6 @@ GST_START_TEST (test_ghost_pads_new_no_target_from_template)
ghosttempl = gst_pad_template_new ("ghosttempl", GST_PAD_SINK,
GST_PAD_ALWAYS, copyghostcaps);
/* FIXME : We should not have to unref those caps, but due to
* a bug in gst_pad_template_new() not stealing the refcount of
* the given caps we have to. */
gst_caps_unref (copyghostcaps);
gst_caps_unref (copypadcaps);
sinkpad = gst_pad_new_from_template (padtempl, "sinkpad");
fail_unless (sinkpad != NULL);
......@@ -723,9 +710,10 @@ GST_START_TEST (test_ghost_pads_forward_setcaps)
templ_caps = gst_caps_from_string ("meh; muh");
src_template = gst_pad_template_new ("src", GST_PAD_SRC,
GST_PAD_ALWAYS, templ_caps);
templ_caps = gst_caps_from_string ("muh; meh");
sink_template = gst_pad_template_new ("sink", GST_PAD_SINK,
GST_PAD_ALWAYS, templ_caps);
gst_caps_unref (templ_caps);
src = gst_pad_new_from_template (src_template, "src");
sink = gst_pad_new_from_template (sink_template, "sink");
......@@ -851,12 +839,13 @@ GST_START_TEST (test_ghost_pads_sink_link_unlink)
padcaps = gst_caps_from_string ("some/caps");
fail_unless (padcaps != NULL);
srctempl = gst_pad_template_new ("srctempl", GST_PAD_SRC,
GST_PAD_ALWAYS, padcaps);
padcaps = gst_caps_from_string ("some/caps");
fail_unless (padcaps != NULL);
sinktempl = gst_pad_template_new ("sinktempl", GST_PAD_SINK,
GST_PAD_ALWAYS, padcaps);
gst_caps_unref (padcaps);
srcpad = gst_pad_new_from_template (srctempl, "src");
fail_unless (srcpad != NULL);
......@@ -922,12 +911,13 @@ GST_START_TEST (test_ghost_pads_src_link_unlink)
padcaps = gst_caps_from_string ("some/caps");
fail_unless (padcaps != NULL);
srctempl = gst_pad_template_new ("srctempl", GST_PAD_SRC,
GST_PAD_ALWAYS, padcaps);
padcaps = gst_caps_from_string ("some/caps");
fail_unless (padcaps != NULL);
sinktempl = gst_pad_template_new ("sinktempl", GST_PAD_SINK,
GST_PAD_ALWAYS, padcaps);
gst_caps_unref (padcaps);
srcpad = gst_pad_new_from_template (srctempl, "src");
fail_unless (srcpad != NULL);
......
......@@ -208,10 +208,6 @@ name_is_valid (const gchar * name, GstPadPresence presence)
new = gst_pad_template_new (name, GST_PAD_SRC, presence, any);
if (new) {
gst_object_unref (GST_OBJECT (new));
/* FIXME : We should not have to unref those caps, but due to
* a bug in gst_pad_template_new() not stealing the refcount of
* the given caps we have to. */
gst_caps_unref (any);
return TRUE;
}
return FALSE;
......@@ -482,11 +478,6 @@ GST_START_TEST (test_push_negotiation)
GST_PAD_ALWAYS, srccaps);
sink_template = gst_pad_template_new ("sink", GST_PAD_SINK,
GST_PAD_ALWAYS, sinkcaps);
/* FIXME : We should not have to unref those caps, but due to
* a bug in gst_pad_template_new() not stealing the refcount of
* the given caps we have to. */
gst_caps_unref (srccaps);
gst_caps_unref (sinkcaps);
sink = gst_pad_new_from_template (sink_template, "sink");
fail_if (sink == NULL);
......@@ -603,10 +594,6 @@ GST_START_TEST (test_get_caps_must_be_copy)
caps = gst_caps_new_any ();
templ =
gst_pad_template_new ("test_templ", GST_PAD_SRC, GST_PAD_ALWAYS, caps);
/* FIXME : This is not correct behaviour, but due to a bug with
* gst_pad_template_new() not stealing the refcount of the given caps,
* we need to unref it */
gst_caps_unref (caps);
pad = gst_pad_new_from_template (templ, NULL);
fail_unless (GST_PAD_CAPS (pad) == NULL, "caps present on pad");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment