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

dxva2: let the decoder handle the device referencing

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 49e1ba40
......@@ -423,16 +423,12 @@ int directx_va_Open(vlc_va_t *va, directx_sys_t *dx_sys,
}
msg_Dbg(va, "DLLs loaded");
if (dx_sys->d3ddev) {
msg_Dbg(va, "Reusing DirectX device");
} else {
/* */
if (dx_sys->pf_create_device(va)) {
msg_Err(va, "Failed to create DirectX device");
goto error;
}
msg_Dbg(va, "CreateDevice succeed");
/* */
if (dx_sys->pf_create_device(va)) {
msg_Err(va, "Failed to create DirectX device");
goto error;
}
msg_Dbg(va, "CreateDevice succeed");
if (dx_sys->pf_create_device_manager(va)) {
msg_Err(va, "D3dCreateDeviceManager failed");
......
......@@ -315,6 +315,12 @@ static int D3dCreateDevice(vlc_va_t *va)
{
vlc_va_sys_t *sys = va->sys;
if (sys->dx_sys.d3ddev) {
msg_Dbg(va, "Reusing Direct3D9 device");
IDirect3DDevice9_AddRef(sys->dx_sys.d3ddev);
return VLC_SUCCESS;
}
/* */
LPDIRECT3D9 (WINAPI *Create9)(UINT SDKVersion);
Create9 = (void *)GetProcAddress(sys->hd3d9_dll, "Direct3DCreate9");
......
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