tests: fix padtemplate leak in selector test

In 0.11, gst_pad_get_pad_template returns a reference.
This commit is contained in:
René Stadler 2011-10-17 21:38:56 +02:00
parent 5239679c09
commit 1db50526e7

View file

@ -545,6 +545,7 @@ GST_START_TEST (test_output_selector_getcaps_active);
for (walker = output_pads; walker; walker = g_list_next (walker)) {
GstCaps *caps;
GstPad *pad;
GstPadTemplate *templ;
pad = gst_pad_get_peer ((GstPad *) walker->data);
@ -553,13 +554,14 @@ GST_START_TEST (test_output_selector_getcaps_active);
/* in 'active' mode, the active srcpad peer's caps should be returned on
* the sinkpad's getcaps */
expected = gst_pad_template_get_caps (gst_pad_get_pad_template ((GstPad *)
walker->data));
templ = gst_pad_get_pad_template ((GstPad *) walker->data);
expected = gst_pad_template_get_caps (templ);
caps = gst_pad_peer_get_caps (input_pad, NULL);
g_assert (gst_caps_is_equal (caps, expected));
gst_caps_unref (caps);
gst_caps_unref (expected);
gst_object_unref (templ);
gst_object_unref (pad);
}