xvcontext: protect X call with lock
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 14 Mar 2013 14:44:53 +0000 (15:44 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 14 Mar 2013 14:44:53 +0000 (15:44 +0100)
sys/xvimage/xvcontext.c

index 52f3dc5..b524644 100644 (file)
@@ -798,7 +798,9 @@ gst_xvcontext_set_synchronous (GstXvContext * context, gboolean synchronous)
 {
   /* call XSynchronize with the current value of synchronous */
   GST_DEBUG ("XSynchronize called with %s", synchronous ? "TRUE" : "FALSE");
+  g_mutex_lock (&context->lock);
   XSynchronize (context->disp, synchronous);
+  g_mutex_unlock (&context->lock);
 }
 
 void