Commit 5e197180 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

directx_va: release the d3ddev in pf_destroy_device()

And make the release strongly typed
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent cab3a974
......@@ -530,10 +530,13 @@ static int D3dCreateDevice(vlc_va_t *va)
*/
static void D3dDestroyDevice(vlc_va_t *va)
{
directx_sys_t *dx_sys = &va->sys->dx_sys;
if (va->sys->d3dvidctx)
ID3D11VideoContext_Release(va->sys->d3dvidctx);
if (va->sys->d3dctx)
ID3D11DeviceContext_Release(va->sys->d3dctx);
if (dx_sys->d3ddev)
ID3D11Device_Release(dx_sys->d3ddev);
}
/**
* It describes our Direct3D object
......
......@@ -438,8 +438,6 @@ void directx_va_Close(vlc_va_t *va, directx_sys_t *dx_sys)
if (dx_sys->pf_destroy_device_manager)
dx_sys->pf_destroy_device_manager(va);
dx_sys->pf_destroy_device(va);
if (dx_sys->d3ddev)
IUnknown_Release( dx_sys->d3ddev );
if (dx_sys->hdecoder_dll)
FreeLibrary(dx_sys->hdecoder_dll);
......
......@@ -430,8 +430,11 @@ static int D3dCreateDevice(vlc_va_t *va)
*/
static void D3dDestroyDevice(vlc_va_t *va)
{
directx_sys_t *dx_sys = &va->sys->dx_sys;
if (va->sys->d3dobj)
IDirect3D9_Release(va->sys->d3dobj);
if (dx_sys->d3ddev)
IDirect3DDevice9_Release(dx_sys->d3ddev);
}
/**
* It describes our Direct3D object
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment