diff --git a/ChangeLog b/ChangeLog index 27b2dae02b..13e06b54a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-01-23 Julien MOUTTE + + * 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 * gst/playback/gstdecodebin2.c: (gst_decode_group_new), diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 788121facc..5e81ff6577 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 7906a4f647..b847ccfc26 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");