vlc | branch: master | Steve Lhomme <[email protected]> | Thu Aug 29 11:21:02 2019 +0200| [9f95244f125977905104b2f314af9bad6b4fdad3] | committer: Steve Lhomme
dxva2: simplify D3dCreateDevice We always have d3d_dev filled as it's coming from the mandatory decoder device. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9f95244f125977905104b2f314af9bad6b4fdad3 --- modules/codec/avcodec/dxva2.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c index 927a2a6d7b..f89f690ba9 100644 --- a/modules/codec/avcodec/dxva2.c +++ b/modules/codec/avcodec/dxva2.c @@ -357,16 +357,7 @@ static int D3dCreateDevice(vlc_va_t *va) { vlc_va_sys_t *sys = va->sys; - if (!sys->d3d_dev.dev) { - HRESULT hr = D3D9_CreateDevice(va, &sys->hd3d, -1, &sys->d3d_dev); - if (FAILED(hr)) - { - msg_Err(va, "IDirect3D9_CreateDevice failed"); - return VLC_EGENERIC; - } - } else { - msg_Dbg(va, "Reusing Direct3D9 device"); - } + assert(sys->d3d_dev.dev); // coming from the decoder device HRESULT (WINAPI *CreateDeviceManager9)(UINT *pResetToken, IDirect3DDeviceManager9 **); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
