summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-07-15 13:29:24 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-07-15 13:30:16 +0200
commit4ec87d9690ee30d7adc1ebb622277e914cb60f4c (patch)
treefbc7a71e778f426e090c382a68843ad552b0021f
parenta7e243b32e1b38a9546e887f7cedb73472fd980f (diff)
d3dvideosink: Open Direct3D devices in a threadsafe way
Otherwise we'll get crashes when using the device from multiple threads, e.g. when using multiple sinks at once. https://bugzilla.gnome.org/show_bug.cgi?id=707523
-rw-r--r--sys/d3dvideosink/d3dhelpers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/d3dvideosink/d3dhelpers.c b/sys/d3dvideosink/d3dhelpers.c
index 6d22f3877..312b913a8 100644
--- a/sys/d3dvideosink/d3dhelpers.c
+++ b/sys/d3dvideosink/d3dhelpers.c
@@ -2374,6 +2374,9 @@ d3d_class_display_device_create (GstD3DVideoSinkClass * klass, UINT adapter)
*/
create_mask = 0 | D3DCREATE_FPU_PRESERVE;
+ /* Make sure that device access is threadsafe */
+ create_mask |= D3DCREATE_MULTITHREADED;
+
/* Determine vertex processing capabilities. Some cards have issues
* using software vertex processing. Courtesy:
* http://www.chadvernon.com/blog/resources/directx9/improved-direct3d-initialization/