GstElement *valve;
GstPad *sink;
GstPad *src;
- GstCaps *caps;
+ GstCaps *caps, *templ_caps;
valve = gst_check_setup_element ("valve");
fail_unless (gst_pad_push (src, gst_buffer_new ()) == GST_FLOW_OK);
fail_unless (g_list_length (buffers) == 2);
caps = gst_pad_get_caps (src, NULL);
- fail_unless (caps && gst_caps_is_equal (caps,
- gst_pad_get_pad_template_caps (src)));
+ templ_caps = gst_pad_get_pad_template_caps (src);
+ fail_unless (caps && gst_caps_is_equal (caps, templ_caps));
+ gst_caps_unref (templ_caps);
gst_caps_unref (caps);
gst_check_drop_buffers ();
fail_unless (gst_pad_push (src, gst_buffer_new ()) == GST_FLOW_OK);
fail_unless (buffers == NULL);
caps = gst_pad_get_caps (src, NULL);
- fail_unless (caps && gst_caps_is_equal (caps,
- gst_pad_get_pad_template_caps (src)));
+ templ_caps = gst_pad_get_pad_template_caps (src);
+ fail_unless (caps && gst_caps_is_equal (caps, templ_caps));
+ gst_caps_unref (templ_caps);
gst_caps_unref (caps);
gst_pad_set_active (src, FALSE);
GstPad *sinkpad, *ghostpad;
GstPadTemplate *padtempl, *ghosttempl;
GstCaps *padcaps, *ghostcaps, *newcaps;
- GstCaps *copypadcaps;
padcaps = gst_caps_from_string ("some/caps");
fail_unless (padcaps != NULL);
ghostcaps = gst_caps_from_string ("some/caps;some/other-caps");
fail_unless (ghostcaps != NULL);
- copypadcaps = gst_caps_copy (padcaps);
padtempl = gst_pad_template_new ("padtempl", GST_PAD_SINK,
- GST_PAD_ALWAYS, copypadcaps);
+ GST_PAD_ALWAYS, padcaps);
fail_unless (padtempl != NULL);
ghosttempl = gst_pad_template_new ("ghosttempl", GST_PAD_SINK,
GST_PAD_ALWAYS, ghostcaps);
fail_unless (gst_caps_is_equal (newcaps, padcaps));
gst_caps_unref (newcaps);
gst_caps_unref (padcaps);
+ gst_caps_unref (ghostcaps);
gst_object_unref (sinkpad);
gst_object_unref (ghostpad);
GstPad *sinkpad, *ghostpad;
GstPadTemplate *padtempl, *ghosttempl;
GstCaps *padcaps, *ghostcaps, *newcaps;
- GstCaps *copypadcaps, *copyghostcaps;
padcaps = gst_caps_from_string ("some/caps");
fail_unless (padcaps != NULL);
ghostcaps = gst_caps_from_string ("some/caps;some/other-caps");
fail_unless (ghostcaps != NULL);
- copypadcaps = gst_caps_copy (padcaps);
- copyghostcaps = gst_caps_copy (ghostcaps);
-
padtempl = gst_pad_template_new ("padtempl", GST_PAD_SINK,
- GST_PAD_ALWAYS, copypadcaps);
+ GST_PAD_ALWAYS, padcaps);
fail_unless (padtempl != NULL);
ghosttempl = gst_pad_template_new ("ghosttempl", GST_PAD_SINK,
- GST_PAD_ALWAYS, copyghostcaps);
+ GST_PAD_ALWAYS, ghostcaps);
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);
+ gst_caps_unref (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");
fail_unless (padcaps != NULL);
srctempl = gst_pad_template_new ("srctempl", GST_PAD_SRC,
GST_PAD_ALWAYS, padcaps);
+ gst_caps_unref (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);
fail_unless (padcaps != NULL);
srctempl = gst_pad_template_new ("srctempl", GST_PAD_SRC,
GST_PAD_ALWAYS, padcaps);
+ gst_caps_unref (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);