summaryrefslogtreecommitdiff
path: root/sys/d3dvideosink
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2012-06-15 13:00:37 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-06-15 14:09:39 +0200
commit830e8b6ec6c3fb70078d7a7700e0e88314aa948f (patch)
tree36553f13fc3d82bff70ee066a879ce3e7d2cd74c /sys/d3dvideosink
parent96b958291438f86516c7fa45c82d0804e91d35e7 (diff)
downloadgstreamer-plugins-bad-830e8b6ec6c3fb70078d7a7700e0e88314aa948f.tar.gz
d3dvideosink: don't recreate the d3d device if it already exists
Diffstat (limited to 'sys/d3dvideosink')
-rw-r--r--sys/d3dvideosink/d3dvideosink.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/d3dvideosink/d3dvideosink.c b/sys/d3dvideosink/d3dvideosink.c
index d86b3e35d..7d54cfba3 100644
--- a/sys/d3dvideosink/d3dvideosink.c
+++ b/sys/d3dvideosink/d3dvideosink.c
@@ -1374,8 +1374,10 @@ gst_d3dvideosink_prepare_window (GstD3DVideoSink * sink)
/* If the app supplied one, use it. Otherwise, go ahead
* and create (and use) our own window, if we didn't create
* one before */
+ if (sink->window_handle && sink->is_new_window) {
+ return;
+ }
if (sink->window_handle) {
- if (!sink->is_new_window)
gst_d3dvideosink_set_window_for_renderer (sink);
} else {
gst_d3dvideosink_create_default_window (sink);