d3dvideosink: don't recreate the d3d device if it already exists

This commit is contained in:
Andoni Morales Alastruey 2012-06-15 13:00:37 +02:00 committed by Sebastian Dröge
parent 96b9582914
commit 830e8b6ec6

View file

@ -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);