d3d11window: Clear old swapchain per prepare

_prepare() might be called multiple times for given window, so clear
old swapchain if any.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1138
This commit is contained in:
Seungha Yang 2019-12-08 16:39:16 +09:00
parent 411bde315c
commit 8154b22a88

View file

@ -1089,6 +1089,11 @@ gst_d3d11_window_prepare (GstD3D11Window * window, guint width, guint height,
}
#endif
if (window->swap_chain) {
gst_d3d11_device_thread_add (window->device,
(GstD3D11DeviceThreadFunc) gst_d3d11_window_release_resources, window);
}
window->aspect_ratio_n = aspect_ratio_n;
window->aspect_ratio_d = aspect_ratio_d;