diff options
author | Julien Moutte <julien@moutte.net> | 2007-01-23 13:19:19 +0000 |
---|---|---|
committer | Julien Moutte <julien@moutte.net> | 2007-01-23 13:19:19 +0000 |
commit | 60dad35de000469257f4358e7ea99af546bccc68 (patch) | |
tree | 3de73b24b03bdf96a2e754bb32d69c806c3acad4 | |
parent | a5146c90370af50ca2254aa9d6b600122ef78dec (diff) | |
download | gstreamer-plugins-base-60dad35de000469257f4358e7ea99af546bccc68.tar.gz |
sys/: Don't lock on navigation event push, just on keysym to string.
Original commit message from CVS:
2007-01-23 Julien MOUTTE <julien@moutte.net>
* sys/ximage/ximagesink.c: (gst_ximagesink_handle_xevents):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_handle_xevents):
Don't lock on navigation event push, just on keysym to string.
Fixes #397673 again.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | sys/ximage/ximagesink.c | 9 | ||||
-rw-r--r-- | sys/xvimage/xvimagesink.c | 8 |
3 files changed, 18 insertions, 6 deletions
@@ -1,3 +1,10 @@ +2007-01-23 Julien MOUTTE <julien@moutte.net> + + * sys/ximage/ximagesink.c: (gst_ximagesink_handle_xevents): + * sys/xvimage/xvimagesink.c: (gst_xvimagesink_handle_xevents): + Don't lock on navigation event push, just on keysym to string. + Fixes #397673 again. + 2007-01-22 Edward Hervey <edward@fluendo.com> * gst/playback/gstdecodebin2.c: (gst_decode_group_new), diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 788121fac..5e81ff657 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -967,11 +967,14 @@ gst_ximagesink_handle_xevents (GstXImageSink * ximagesink) e.xkey.keycode, 0); g_mutex_unlock (ximagesink->x_lock); if (keysym != NoSymbol) { + char *key_str = NULL; + g_mutex_lock (ximagesink->x_lock); - gst_navigation_send_key_event (GST_NAVIGATION (ximagesink), - e.type == KeyPress ? - "key-press" : "key-release", XKeysymToString (keysym)); + key_str = XKeysymToString (keysym); g_mutex_unlock (ximagesink->x_lock); + gst_navigation_send_key_event (GST_NAVIGATION (ximagesink), + e.type == KeyPress ? "key-press" : "key-release", key_str); + } else { gst_navigation_send_key_event (GST_NAVIGATION (ximagesink), e.type == KeyPress ? "key-press" : "key-release", "unknown"); diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 7906a4f64..b847ccfc2 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -1092,11 +1092,13 @@ gst_xvimagesink_handle_xevents (GstXvImageSink * xvimagesink) e.xkey.keycode, 0); g_mutex_unlock (xvimagesink->x_lock); if (keysym != NoSymbol) { + char *key_str = NULL; + g_mutex_lock (xvimagesink->x_lock); - gst_navigation_send_key_event (GST_NAVIGATION (xvimagesink), - e.type == KeyPress ? - "key-press" : "key-release", XKeysymToString (keysym)); + key_str = XKeysymToString (keysym); g_mutex_unlock (xvimagesink->x_lock); + gst_navigation_send_key_event (GST_NAVIGATION (xvimagesink), + e.type == KeyPress ? "key-press" : "key-release", key_str); } else { gst_navigation_send_key_event (GST_NAVIGATION (xvimagesink), e.type == KeyPress ? "key-press" : "key-release", "unknown"); |