From 4a6daad51746aedfa9d9761a869711de4fa0200c Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Fri, 26 Jul 2024 02:46:46 +0900 Subject: [PATCH] d3d12: Suppress fence data object leak report We don't release GstD3D12Device intentionally, thus a GstD3D12FenceDataPool owned by a device will not be released but that's expected leak. Part-of: --- .../gst-libs/gst/d3d12/gstd3d12fencedatapool.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/d3d12/gstd3d12fencedatapool.cpp b/subprojects/gst-plugins-bad/gst-libs/gst/d3d12/gstd3d12fencedatapool.cpp index f4f82f5a9d..5f9c899290 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d12/gstd3d12fencedatapool.cpp +++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d12/gstd3d12fencedatapool.cpp @@ -208,9 +208,13 @@ gst_d3d12_fence_data_pool_acquire (GstD3D12FenceDataPool * pool, } } - if (!new_data) + if (!new_data) { new_data = gst_d3d12_fence_data_new (); + if (GST_OBJECT_FLAG_IS_SET (pool, GST_OBJECT_FLAG_MAY_BE_LEAKED)) + GST_MINI_OBJECT_FLAG_SET (new_data, GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED); + } + new_data->pool = (GstD3D12FenceDataPool *) gst_object_ref (pool); new_data->dispose = (GstMiniObjectDisposeFunction) gst_d3d12_fence_data_dispose;