diff --git a/samples/GtkVideoPlayer.cs b/samples/GtkVideoPlayer.cs index 14560f0263..ad31b2d286 100644 --- a/samples/GtkVideoPlayer.cs +++ b/samples/GtkVideoPlayer.cs @@ -19,6 +19,9 @@ public class MainWindow : Gtk.Window { bool _pipelineOK = false; public static void Main (string[] args) { + if (System.Environment.OSVersion.Platform == PlatformID.Unix) + XInitThreads (); + Gtk.Application.Init (); Gst.Application.Init (); MainWindow window = new MainWindow (); @@ -262,4 +265,7 @@ public class MainWindow : Gtk.Window { [DllImport ("libgdk-win32-2.0-0.dll") ] static extern bool gdk_window_ensure_native (IntPtr handle); #endif + + [DllImport ("libX11.so.6")] + static extern int XInitThreads (); } diff --git a/samples/gtk-video-player.exe.config b/samples/gtk-video-player.exe.config new file mode 100644 index 0000000000..4a1507ce99 --- /dev/null +++ b/samples/gtk-video-player.exe.config @@ -0,0 +1,3 @@ + + +