summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/owl-video-widget/owl-video/gtk_multithread_safe.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-sato/owl-video-widget/owl-video/gtk_multithread_safe.patch')
-rw-r--r--meta/recipes-sato/owl-video-widget/owl-video/gtk_multithread_safe.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-sato/owl-video-widget/owl-video/gtk_multithread_safe.patch b/meta/recipes-sato/owl-video-widget/owl-video/gtk_multithread_safe.patch
new file mode 100644
index 0000000000..e153c5e3b9
--- /dev/null
+++ b/meta/recipes-sato/owl-video-widget/owl-video/gtk_multithread_safe.patch
@@ -0,0 +1,38 @@
1Use gdk_threads_enter/gdk_threads_leave to ensure gtk multithread safe
2
3If the video player tries to play an unknown type file, it will enter
4the error_cb() function, which is called in another thread.
5Use gdk_threads_enter/gdk_threads_leave to ensure the safe of gtk
6multi-thread operation.
7
8Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
9
10diff -ruN video-orig/src/video.c video/src/video.c
11--- video-orig/src/video.c 2010-10-15 16:07:26.522346398 +0800
12+++ video/src/video.c 2010-10-15 16:25:51.780296717 +0800
13@@ -96,6 +96,7 @@
14 {
15 GtkWidget *dialog;
16
17+ gdk_threads_enter();
18 dialog = gtk_message_dialog_new (data->window,
19 GTK_DIALOG_NO_SEPARATOR,
20 GTK_MESSAGE_ERROR,
21@@ -103,6 +104,7 @@
22 error->message);
23 gtk_dialog_run (GTK_DIALOG (dialog));
24 gtk_widget_destroy (dialog);
25+ gdk_threads_leave();
26 }
27
28 /**
29@@ -606,7 +608,9 @@
30
31 gtk_widget_show_all (GTK_WIDGET (data->window));
32
33+ gdk_threads_enter();
34 gtk_main ();
35+ gdk_threads_leave();
36
37 /**
38 * Cleanup.