[vlc-commits] d3d11va: simplify the handling of "winrt-d3dcontext"
Steve Lhomme
git at videolan.org
Wed Feb 20 15:10:43 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Feb 20 15:09:38 2019 +0100| [10bb8b94b31ceb36d61f2e5ef08bd5d2ddcb5e2f] | committer: Steve Lhomme
d3d11va: simplify the handling of "winrt-d3dcontext"
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=10bb8b94b31ceb36d61f2e5ef08bd5d2ddcb5e2f
---
modules/codec/avcodec/d3d11va.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index c8e60d7ff1..e7a62cbd83 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -427,18 +427,19 @@ static int D3dCreateDevice(vlc_va_t *va)
}
#if VLC_WINSTORE_APP
- sys->d3d_dev.d3dcontext = var_InheritInteger(va, "winrt-d3dcontext");
- if (likely(sys->d3d_dev.d3dcontext))
+ if (sys->d3d_dev.d3dcontext == NULL)
+ sys->d3d_dev.d3dcontext = var_InheritInteger(va, "winrt-d3dcontext"); /* LEGACY */
+#endif
+ if (sys->d3d_dev.d3dcontext != NULL)
{
ID3D11Device* d3ddevice = NULL;
ID3D11DeviceContext_GetDevice(sys->d3d_dev.d3dcontext, &sys->d3d_dev.d3ddevice);
ID3D11DeviceContext_AddRef(sys->d3d_dev.d3dcontext);
ID3D11Device_Release(sys->d3d_dev.d3ddevice);
}
-#endif
/* */
- if (!sys->d3d_dev.d3ddevice)
+ else
{
hr = D3D11_CreateDevice(va, &sys->hd3d, NULL, true, &sys->d3d_dev);
if (FAILED(hr)) {
More information about the vlc-commits
mailing list