[gthumb] gstreamer: do not crash when using hardware acceleration for videos
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] gstreamer: do not crash when using hardware acceleration for videos
- Date: Sat, 22 May 2021 08:27:39 +0000 (UTC)
commit 971db8ea825dbf980e844734efc5fa1158dcf727
Author: Paolo Bacchilega <paobac src gnome org>
Date: Fri May 21 09:14:02 2021 +0200
gstreamer: do not crash when using hardware acceleration for videos
gthumb/main.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/gthumb/main.c b/gthumb/main.c
index a754d758..c8add34c 100644
--- a/gthumb/main.c
+++ b/gthumb/main.c
@@ -21,6 +21,9 @@
#include <config.h>
#include <gtk/gtk.h>
+#ifdef GDK_WINDOWING_X11
+#include <X11/Xlib.h>
+#endif
#include "gth-application.h"
#include "gth-main.h"
#include "gth-window.h"
@@ -49,6 +52,11 @@ main (int argc, char *argv[])
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+#if defined (HAVE_GSTREAMER) && defined (GDK_WINDOWING_X11)
+ /* https://discourse.gnome.org/t/how-to-correctly-init-gtk-app-with-gstreamer/5105/3 */
+ XInitThreads();
+#endif
+
/* run the main application */
Main_Application = gth_application_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]