{
GstElement *src;
GstBuffer *buffer;
- GstCaps *caps;
+ GstCaps *caps, *ccaps;
src = setup_appsrc ();
/* Check the output caps */
fail_unless (g_list_length (buffers) == 4);
- fail_unless (gst_caps_is_equal (gst_pad_get_current_caps (mysinkpad), caps));
+ ccaps = gst_pad_get_current_caps (mysinkpad);
+ fail_unless (gst_caps_is_equal (ccaps, caps));
+ gst_caps_unref (ccaps);
ASSERT_SET_STATE (src, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS);
gst_caps_unref (caps);
{
GstStructure *in_s, *out_s;
gint out_chans;
+ GstCaps *ccaps;
in_s = gst_caps_get_structure (incaps, 0);
- out_s = gst_caps_get_structure (gst_pad_get_current_caps (mysinkpad), 0);
+ ccaps = gst_pad_get_current_caps (mysinkpad);
+ out_s = gst_caps_get_structure (ccaps, 0);
fail_unless (gst_structure_get_int (out_s, "channels", &out_chans));
/* positions for 1 and 2 channels are implicit if not provided */
gst_structure_to_string (in_s), gst_structure_to_string (out_s));
}
}
+ gst_caps_unref (ccaps);
}
buffers = g_list_remove (buffers, outbuffer);
get_int_mc_caps (11, G_BYTE_ORDER, 16, 16, TRUE, in_layout);
GstCaps *out_caps = get_int_mc_caps (2, G_BYTE_ORDER, 16, 16, TRUE, NULL);
- RUN_CONVERSION ("11 channels to 2", in,
- gst_caps_copy (in_caps), out, gst_caps_copy (out_caps));
+ RUN_CONVERSION ("11 channels to 2", in, in_caps, out, out_caps);
}
{
gint16 in[] = { 0, 0 };
GstCaps *out_caps =
get_int_mc_caps (11, G_BYTE_ORDER, 16, 16, TRUE, out_layout);
- RUN_CONVERSION ("2 channels to 11", in,
- gst_caps_copy (in_caps), out, gst_caps_copy (out_caps));
+ RUN_CONVERSION ("2 channels to 11", in, in_caps, out, out_caps);
}
}