d3d11window: Clear cached buffer per new caps

d3d11window holds one buffer to redraw client area per resize event.

When the input format is being changed, this buffer should be cleared
to avoid mismatch beween newly configured shader/videoprocessor and
the format of previously cached buffer.
This commit is contained in:
Seungha Yang 2020-02-05 22:12:15 +09:00
parent 5b8ff98f96
commit 478fb29974

View file

@ -443,6 +443,8 @@ gst_d3d11_window_prepare (GstD3D11Window * window, guint width, guint height,
GST_DEBUG_OBJECT (window, "Prepare window with %dx%d caps %" GST_PTR_FORMAT, GST_DEBUG_OBJECT (window, "Prepare window with %dx%d caps %" GST_PTR_FORMAT,
width, height, caps); width, height, caps);
gst_clear_buffer (&window->cached_buffer);
render_caps = gst_d3d11_device_get_supported_caps (window->device, render_caps = gst_d3d11_device_get_supported_caps (window->device,
(D3D11_FORMAT_SUPPORT) (D3D11_FORMAT_SUPPORT_TEXTURE2D | (D3D11_FORMAT_SUPPORT) (D3D11_FORMAT_SUPPORT_TEXTURE2D |
D3D11_FORMAT_SUPPORT_DISPLAY)); D3D11_FORMAT_SUPPORT_DISPLAY));