g_thread_create() is deprecated in GLib master, use g_thread_try_new() instead
[glsdk/gstreamer0-10.git] / gst / gstsystemclock.c
index ef691fd17de7ffc4b4ded24e245c8afd6d77d2b4..2c71489cfa2bbd20b19847e900bebc10c56b8d23 100644 (file)
@@ -735,8 +735,14 @@ gst_system_clock_start_async (GstSystemClock * clock)
   if (G_LIKELY (clock->thread != NULL))
     return TRUE;                /* Thread already running. Nothing to do */
 
+#if !GLIB_CHECK_VERSION (2, 31, 0)
   clock->thread = g_thread_create ((GThreadFunc) gst_system_clock_async_thread,
       clock, TRUE, &error);
+#else
+  clock->thread = g_thread_try_new ("GstSystemClock",
+      (GThreadFunc) gst_system_clock_async_thread, clock, &error);
+#endif
+
   if (G_UNLIKELY (error))
     goto no_thread;