From 571f119feaf5129cc789ada38cd6404d60fef2aa Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Mon, 15 Jul 2019 17:06:42 +0200 Subject: [PATCH] onvif tests: use g_cond_wait() correctly g_cond_wait() has to be called in a loop until required conditions are met Fixes #71 --- tests/check/gst/onvif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/check/gst/onvif.c b/tests/check/gst/onvif.c index beb276fbf4..087a2f7983 100644 --- a/tests/check/gst/onvif.c +++ b/tests/check/gst/onvif.c @@ -894,7 +894,8 @@ test_seek (const gchar * range, const gchar * speed, const gchar * scale, gst_rtsp_message_unset (&request); g_mutex_lock (&check_mutex); - g_cond_wait (&check_cond, &check_mutex); + while (!terminal_frame || !received_rtcp) + g_cond_wait (&check_cond, &check_mutex); g_mutex_unlock (&check_mutex); send_teardown (client);