From 43fc9525cae33dea9ebef61e608f3977db5a881e Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Tue, 12 Nov 2024 02:06:39 +0900 Subject: [PATCH] d3d12swapchainsink: Fix error when the sink is reused Release backbuffer just before releasing swapchain Part-of: --- .../gst-plugins-bad/sys/d3d12/gstd3d12swapchainsink.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12swapchainsink.cpp b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12swapchainsink.cpp index 4077d096eb..db0fac6c3d 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12swapchainsink.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12swapchainsink.cpp @@ -143,6 +143,8 @@ struct GstD3D12SwapChainSinkPrivate gst_clear_object (&comp); gst_clear_object (&ca_pool); gst_clear_object (&fence_data_pool); + gst_clear_buffer (&msaa_buf); + backbuf.clear (); auto iter = color_balance_channels; while (iter) { @@ -163,9 +165,7 @@ struct GstD3D12SwapChainSinkPrivate } gst_clear_caps (&caps); gst_clear_buffer (&cached_buf); - gst_clear_buffer (&msaa_buf); gst_clear_object (&conv); - backbuf.clear (); convert_format = GST_VIDEO_FORMAT_UNKNOWN; caps_updated = false; first_present = true;