[PATCH 1/5] mfplat/sample: Simplify code for setting DirectX manager.

Giovanni Mascellani gmascellani at codeweavers.com
Fri Mar 18 08:27:15 CDT 2022


Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
---
 dlls/mfplat/sample.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/dlls/mfplat/sample.c b/dlls/mfplat/sample.c
index 8ef80eb5f24..527f44fd8fd 100644
--- a/dlls/mfplat/sample.c
+++ b/dlls/mfplat/sample.c
@@ -1214,13 +1214,9 @@ static HRESULT WINAPI sample_allocator_SetDirectXManager(IMFVideoSampleAllocator
         IDirect3DDeviceManager9_Release(allocator->d3d9_device_manager);
     if (allocator->dxgi_device_manager)
         IMFDXGIDeviceManager_Release(allocator->dxgi_device_manager);
-    allocator->d3d9_device_manager = NULL;
-    allocator->dxgi_device_manager = NULL;
 
-    if (dxgi_device_manager)
-        allocator->dxgi_device_manager = dxgi_device_manager;
-    else if (d3d9_device_manager)
-        allocator->d3d9_device_manager = d3d9_device_manager;
+    allocator->d3d9_device_manager = d3d9_device_manager;
+    allocator->dxgi_device_manager = dxgi_device_manager;
 
     LeaveCriticalSection(&allocator->cs);
 
-- 
2.35.1




More information about the wine-devel mailing list