mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
d3d12device: Fix IDXGIFactory2 leak
factory passed to gst_d3d12_device_find_adapter() method is valid handle already Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6340>
This commit is contained in:
parent
121e52886b
commit
94dfef68e1
1 changed files with 0 additions and 13 deletions
|
@ -670,16 +670,6 @@ gst_d3d12_device_find_adapter (const GstD3D12DeviceConstructData * data,
|
||||||
IDXGIFactory2 * factory, guint * index, IDXGIAdapter1 ** rst)
|
IDXGIFactory2 * factory, guint * index, IDXGIAdapter1 ** rst)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
UINT factory_flags = 0;
|
|
||||||
|
|
||||||
if (gst_d3d12_device_enable_debug ())
|
|
||||||
factory_flags |= DXGI_CREATE_FACTORY_DEBUG;
|
|
||||||
|
|
||||||
hr = CreateDXGIFactory2 (factory_flags, IID_PPV_ARGS (&factory));
|
|
||||||
if (FAILED (hr)) {
|
|
||||||
GST_WARNING ("cannot create dxgi factory, hr: 0x%x", (guint) hr);
|
|
||||||
return hr;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (data->type) {
|
switch (data->type) {
|
||||||
case GST_D3D12_DEVICE_CONSTRUCT_FOR_INDEX:{
|
case GST_D3D12_DEVICE_CONSTRUCT_FOR_INDEX:{
|
||||||
|
@ -735,9 +725,6 @@ gst_d3d12_device_new_internal (const GstD3D12DeviceConstructData * data)
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_d3d12_device_debug,
|
GST_DEBUG_CATEGORY_INIT (gst_d3d12_device_debug,
|
||||||
"d3d12device", 0, "d3d12 device object");
|
"d3d12device", 0, "d3d12 device object");
|
||||||
|
|
||||||
if (gst_d3d12_device_enable_debug ())
|
|
||||||
factory_flags |= DXGI_CREATE_FACTORY_DEBUG;
|
|
||||||
|
|
||||||
hr = CreateDXGIFactory2 (factory_flags, IID_PPV_ARGS (&factory));
|
hr = CreateDXGIFactory2 (factory_flags, IID_PPV_ARGS (&factory));
|
||||||
if (FAILED (hr)) {
|
if (FAILED (hr)) {
|
||||||
GST_WARNING ("Could create dxgi factory, hr: 0x%x", (guint) hr);
|
GST_WARNING ("Could create dxgi factory, hr: 0x%x", (guint) hr);
|
||||||
|
|
Loading…
Reference in a new issue