Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/LAVVideo/decoders/dxva2dec.cpp')
-rw-r--r--decoder/LAVVideo/decoders/dxva2dec.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/decoder/LAVVideo/decoders/dxva2dec.cpp b/decoder/LAVVideo/decoders/dxva2dec.cpp
index f93f64ac..ecc5ae09 100644
--- a/decoder/LAVVideo/decoders/dxva2dec.cpp
+++ b/decoder/LAVVideo/decoders/dxva2dec.cpp
@@ -614,7 +614,7 @@ HRESULT CDecDXVA2::RetrieveVendorId(IDirect3DDeviceManager9 *pDevManager)
done:
SafeRelease(&pD3D);
SafeRelease(&pDevice);
- if (hDevice != 0) {
+ if (hDevice && hDevice != INVALID_HANDLE_VALUE) {
pDevManager->UnlockDevice(hDevice, FALSE);
pDevManager->CloseDeviceHandle(hDevice);
}