g_thread_create() is deprecated in GLib master, use g_thread_try_new() instead
[glsdk/gstreamer0-10.git] / libs / gst / net / gstnettimeprovider.c
index b04d28243ec1ca7eafb0404dac46587f4f0ec4a4..8e3e7f6d1eb23753df7581b2367893e92779a08b 100644 (file)
@@ -403,9 +403,15 @@ gst_net_time_provider_start (GstNetTimeProvider * 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_time_provider_thread, self, TRUE,
       &error);
-  if (!self->thread)
+#else
+  self->thread = g_thread_try_new ("GstNetTimeProvider",
+      gst_net_time_provider_thread, self, &error);
+#endif
+
+  if (error != NULL)
     goto no_thread;
 
   return TRUE;