d3d12swapchainsink: Fix error when the sink is reused

Release backbuffer just before releasing swapchain

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7867>
This commit is contained in:
Seungha Yang 2024-11-12 02:06:39 +09:00 committed by GStreamer Marge Bot
parent a1c92c0cb1
commit 43fc9525ca

View file

@ -143,6 +143,8 @@ struct GstD3D12SwapChainSinkPrivate
gst_clear_object (&comp); gst_clear_object (&comp);
gst_clear_object (&ca_pool); gst_clear_object (&ca_pool);
gst_clear_object (&fence_data_pool); gst_clear_object (&fence_data_pool);
gst_clear_buffer (&msaa_buf);
backbuf.clear ();
auto iter = color_balance_channels; auto iter = color_balance_channels;
while (iter) { while (iter) {
@ -163,9 +165,7 @@ struct GstD3D12SwapChainSinkPrivate
} }
gst_clear_caps (&caps); gst_clear_caps (&caps);
gst_clear_buffer (&cached_buf); gst_clear_buffer (&cached_buf);
gst_clear_buffer (&msaa_buf);
gst_clear_object (&conv); gst_clear_object (&conv);
backbuf.clear ();
convert_format = GST_VIDEO_FORMAT_UNKNOWN; convert_format = GST_VIDEO_FORMAT_UNKNOWN;
caps_updated = false; caps_updated = false;
first_present = true; first_present = true;