From 1fe8a93383aca1674e25291d28d18dc7ff32cf22 Mon Sep 17 00:00:00 2001 From: Eloi BAIL Date: Fri, 28 Mar 2014 11:14:34 -0400 Subject: [PATCH 2/2] d3dvideosink: fix device leak on caps change Leak on caps change using our own app window instead of default d3dvideosink window --- sys/d3dvideosink/d3dvideosink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/d3dvideosink/d3dvideosink.c b/sys/d3dvideosink/d3dvideosink.c index c7218f3..f467097 100644 --- a/sys/d3dvideosink/d3dvideosink.c +++ b/sys/d3dvideosink/d3dvideosink.c @@ -1382,7 +1382,10 @@ gst_d3dvideosink_prepare_window (GstD3DVideoSink * sink) gst_d3dvideosink_release_d3d_device(sink); GST_D3DVIDEOSINK_D3D_DEVICE_UNLOCK(sink); } else if (sink->window_handle) { - gst_d3dvideosink_set_window_for_renderer (sink); + GST_D3DVIDEOSINK_D3D_DEVICE_LOCK(sink); + gst_d3dvideosink_release_d3d_device(sink); + GST_D3DVIDEOSINK_D3D_DEVICE_UNLOCK(sink); + gst_d3dvideosink_set_window_for_renderer (sink); } else { gst_d3dvideosink_create_default_window (sink); } -- 1.7.11.7