g_thread_create() is deprecated in GLib master, use g_thread_try_new() instead
[glsdk/gstreamer0-10.git] / libs / gst / net / gstnetclientclock.c
index dcaa975891e7cf1fc3b728ee22960cd1c2d682a0..dc56b4f09dbf42f87492205de7303b79a0634722 100644 (file)
@@ -457,9 +457,15 @@ gst_net_client_clock_start (GstNetClientClock * self)
   gst_poll_add_fd (self->priv->fdset, &self->priv->sock);
   gst_poll_fd_ctl_read (self->priv->fdset, &self->priv->sock, TRUE);
 
+#if !GLIB_CHECK_VERSION (2, 31, 0)
   self->thread = g_thread_create (gst_net_client_clock_thread, self, TRUE,
       &error);
-  if (!self->thread)
+#else
+  self->thread = g_thread_try_new ("GstNetClientClock",
+      gst_net_client_clock_thread, self, &error);
+#endif
+
+  if (error != NULL)
     goto no_thread;
 
   return TRUE;