mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +00:00
tests/netsim: Set src caps before creating buffers
GstHarness requires the source pad caps to be set before buffer allocations. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2179>
This commit is contained in:
parent
817544860d
commit
be2996c48e
1 changed files with 3 additions and 1 deletions
|
@ -29,10 +29,12 @@ GST_START_TEST (netsim_stress_delayed)
|
||||||
{
|
{
|
||||||
GstHarness *h = gst_harness_new_parse ("netsim delay-probability=0.5");
|
GstHarness *h = gst_harness_new_parse ("netsim delay-probability=0.5");
|
||||||
GstCaps *caps = gst_caps_from_string ("mycaps");
|
GstCaps *caps = gst_caps_from_string ("mycaps");
|
||||||
GstBuffer *buf = gst_harness_create_buffer (h, 100);
|
GstBuffer *buf;
|
||||||
GstHarnessThread *state, *push;
|
GstHarnessThread *state, *push;
|
||||||
GstSegment segment;
|
GstSegment segment;
|
||||||
|
|
||||||
|
gst_harness_set_src_caps (h, gst_caps_ref (caps));
|
||||||
|
buf = gst_harness_create_buffer (h, 100);
|
||||||
gst_segment_init (&segment, GST_FORMAT_TIME);
|
gst_segment_init (&segment, GST_FORMAT_TIME);
|
||||||
state = gst_harness_stress_statechange_start (h);
|
state = gst_harness_stress_statechange_start (h);
|
||||||
push = gst_harness_stress_push_buffer_start (h, caps, &segment, buf);
|
push = gst_harness_stress_push_buffer_start (h, caps, &segment, buf);
|
||||||
|
|
Loading…
Reference in a new issue