From 7cc59fcdf6bf7024fdba337ca5eb566ee1667405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 31 Aug 2015 16:42:30 -0400 Subject: [PATCH] tests: Fix rtpsession test failure The time of the first RTCP packet is semi-random, so sometimes it was produced before enough packets from the second SSRC were received. First drop queued RTCP packets, then advance the clock enough to ensure that at least one new RTCP packet is produced. https://bugzilla.gnome.org/show_bug.cgi?id=750731 --- tests/check/elements/rtpsession.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/check/elements/rtpsession.c b/tests/check/elements/rtpsession.c index 96d5598ba2..f7c1bdf815 100644 --- a/tests/check/elements/rtpsession.c +++ b/tests/check/elements/rtpsession.c @@ -232,8 +232,12 @@ GST_START_TEST (test_multiple_ssrc_rr) gst_clock_id_unref (tid); } + out_buf = g_async_queue_try_pop (data.rtcp_queue); + if (out_buf) + gst_buffer_unref (out_buf); + gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), - gst_clock_id_get_time (id) + (2 * GST_SECOND)); + gst_clock_id_get_time (id) + (5 * GST_SECOND)); gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id); tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock)); gst_clock_id_unref (id);