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);
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);
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");
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);
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);
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;
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);
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");