[vlc-devel] [PATCH 2/3] dxva2: warn when closing the device handle failed
Steve Lhomme
robux4 at gmail.com
Fri Sep 29 14:45:26 CEST 2017
---
modules/codec/avcodec/dxva2.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index c5e829bdf2..e409aa591f 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -517,7 +517,11 @@ static void DxDestroyVideoService(vlc_va_t *va)
{
directx_sys_t *dx_sys = &va->sys->dx_sys;
if (va->sys->device)
- IDirect3DDeviceManager9_CloseDeviceHandle(va->sys->devmng, va->sys->device);
+ {
+ HRESULT hr = IDirect3DDeviceManager9_CloseDeviceHandle(va->sys->devmng, va->sys->device);
+ if (FAILED(hr))
+ msg_Warn(va, "Failed to release device handle %x. (hr=0x%lX)", va->sys->device, hr);
+ }
if (dx_sys->d3ddec)
IDirectXVideoDecoderService_Release(dx_sys->d3ddec);
}
--
2.12.1
More information about the vlc-devel
mailing list