tests: fix locking in gstpoll unit test
authorTim-Philipp Müller <tim@centricular.com>
Sun, 6 Jul 2014 11:09:31 +0000 (12:09 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 6 Jul 2014 11:10:09 +0000 (12:10 +0100)
The mutex needs to be locked when g_cond_wait*() is
called.

tests/check/gst/gstpoll.c

index 3357bf5..2fd756b 100644 (file)
@@ -275,6 +275,7 @@ delayed_control (gpointer data)
   gst_poll_fd_ctl_write (set, &fd, TRUE);
   gst_poll_restart (set);
 
+  g_mutex_lock (&mutex);
   THREAD_SYNCHRONIZE ();
 
   g_usleep (500000);