[vlc-devel] [PATCH] d3d11va: fix interface query from the wrong pointer

Steve Lhomme robux4 at videolabs.io
Tue Oct 31 13:42:47 CET 2017


Strangely the compiler doesn't complain.
---
 modules/codec/avcodec/d3d11va.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 3c4db6e1ce..e15a633b12 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -437,7 +437,7 @@ static int D3dCreateDevice(vlc_va_t *va)
     va->sys->d3dctx = hd3d11.d3dcontext;
 
     void *d3dvidctx = NULL;
-    hr = ID3D11DeviceContext_QueryInterface(dx_sys->d3ddev, &IID_ID3D11VideoContext, &d3dvidctx);
+    hr = ID3D11DeviceContext_QueryInterface(hd3d11.d3dcontext, &IID_ID3D11VideoContext, &d3dvidctx);
     if (FAILED(hr)) {
        msg_Err(va, "Could not Query ID3D11VideoContext Interface. (hr=0x%lX)", hr);
        return VLC_EGENERIC;
-- 
2.14.2



More information about the vlc-devel mailing list