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

directx_va: do the d3ddec release in pf_destroy_video_service()

And make the release strongly typed
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 5e197180
...@@ -610,7 +610,9 @@ static int DxCreateVideoService(vlc_va_t *va) ...@@ -610,7 +610,9 @@ static int DxCreateVideoService(vlc_va_t *va)
*/ */
static void DxDestroyVideoService(vlc_va_t *va) static void DxDestroyVideoService(vlc_va_t *va)
{ {
VLC_UNUSED(va); directx_sys_t *dx_sys = &va->sys->dx_sys;
if (dx_sys->d3ddec)
ID3D11VideoDevice_Release(dx_sys->d3ddec);
} }
static void ReleaseInputList(input_list_t *p_list) static void ReleaseInputList(input_list_t *p_list)
......
...@@ -433,8 +433,6 @@ void directx_va_Close(vlc_va_t *va, directx_sys_t *dx_sys) ...@@ -433,8 +433,6 @@ void directx_va_Close(vlc_va_t *va, directx_sys_t *dx_sys)
{ {
DestroyVideoDecoder(va, dx_sys); DestroyVideoDecoder(va, dx_sys);
dx_sys->pf_destroy_video_service(va); dx_sys->pf_destroy_video_service(va);
if (dx_sys->d3ddec)
IUnknown_Release(dx_sys->d3ddec);
if (dx_sys->pf_destroy_device_manager) if (dx_sys->pf_destroy_device_manager)
dx_sys->pf_destroy_device_manager(va); dx_sys->pf_destroy_device_manager(va);
dx_sys->pf_destroy_device(va); dx_sys->pf_destroy_device(va);
......
...@@ -562,8 +562,11 @@ static int DxCreateVideoService(vlc_va_t *va) ...@@ -562,8 +562,11 @@ static int DxCreateVideoService(vlc_va_t *va)
*/ */
static void DxDestroyVideoService(vlc_va_t *va) static void DxDestroyVideoService(vlc_va_t *va)
{ {
directx_sys_t *dx_sys = &va->sys->dx_sys;
if (va->sys->device) if (va->sys->device)
IDirect3DDeviceManager9_CloseDeviceHandle(va->sys->devmng, va->sys->device); IDirect3DDeviceManager9_CloseDeviceHandle(va->sys->devmng, va->sys->device);
if (dx_sys->d3ddec)
IDirectXVideoDecoderService_Release(dx_sys->d3ddec);
} }
static void ReleaseInputList(input_list_t *p_list) static void ReleaseInputList(input_list_t *p_list)
......
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