diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index b9e90e51be..49ad8ed02f 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -139,13 +139,13 @@ check_PROGRAMS = \ libs/bitreader \ libs/bytereader \ libs/bytewriter \ + libs/collectpads \ libs/gstnetclientclock \ libs/gstnettimeprovider \ libs/transform1 # failing tests -noinst_PROGRAMS = \ - libs/collectpads +noinst_PROGRAMS = # elements to ignore for the state tests # STATE_IGNORE_ELEMENTS = diff --git a/tests/check/libs/collectpads.c b/tests/check/libs/collectpads.c index 72cac1b9f9..229b46faa3 100644 --- a/tests/check/libs/collectpads.c +++ b/tests/check/libs/collectpads.c @@ -79,10 +79,19 @@ collected_cb (GstCollectPads * pads, gpointer user_data) static gpointer push_buffer (gpointer user_data) { + GstFlowReturn flow; + GstCaps *caps; TestData *test_data = (TestData *) user_data; - fail_unless (gst_pad_push (test_data->pad, test_data->buffer) - == GST_FLOW_OK); + gst_pad_push_event (test_data->pad, gst_event_new_stream_start ("test")); + + caps = gst_caps_new_empty_simple ("foo/x-bar"); + gst_pad_push_event (test_data->pad, gst_event_new_caps (caps)); + gst_caps_unref (caps); + + flow = gst_pad_push (test_data->pad, test_data->buffer); + fail_unless (flow == GST_FLOW_OK, "got flow %s instead of OK", + gst_flow_get_name (flow)); return NULL; } @@ -260,6 +269,8 @@ GST_START_TEST (test_collect_twice) sinkpad2, sizeof (TestData)); fail_unless (data2 != NULL); + GST_INFO ("round 1"); + buf1 = gst_buffer_new (); /* start collect pads */ @@ -294,8 +305,14 @@ GST_START_TEST (test_collect_twice) gst_collect_pads_stop (collect); collected = FALSE; + GST_INFO ("round 2"); + buf2 = gst_buffer_new (); + /* clear EOS from pads */ + gst_pad_push_event (srcpad1, gst_event_new_flush_stop (TRUE)); + gst_pad_push_event (srcpad2, gst_event_new_flush_stop (TRUE)); + /* start collect pads */ gst_collect_pads_start (collect);