[vlc-devel] [PATCH 19/39] d3d11va: no need to type the intermediate recipient of QueryInterface results
Steve Lhomme
robux4 at videolabs.io
Fri Jun 2 16:46:22 CEST 2017
---
modules/codec/avcodec/d3d11va.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 4fd131c9b7..03998a6f6a 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -365,8 +365,8 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
dx_sys->d3ddev = NULL;
va->sys->render = DXGI_FORMAT_UNKNOWN;
if ( p_sys != NULL && p_sys->context != NULL ) {
- ID3D11VideoContext *d3dvidctx = NULL;
- HRESULT hr = ID3D11DeviceContext_QueryInterface(p_sys->context, &IID_ID3D11VideoContext, (void **)&d3dvidctx);
+ void *d3dvidctx = NULL;
+ HRESULT hr = ID3D11DeviceContext_QueryInterface(p_sys->context, &IID_ID3D11VideoContext, &d3dvidctx);
if (FAILED(hr)) {
msg_Err(va, "Could not Query ID3D11VideoContext Interface from the picture. (hr=0x%lX)", hr);
} else {
@@ -465,8 +465,8 @@ static int D3dCreateDevice(vlc_va_t *va)
dx_sys->d3ddev = d3ddev;
va->sys->d3dctx = d3dctx;
- ID3D11VideoContext *d3dvidctx = NULL;
- hr = ID3D11DeviceContext_QueryInterface(d3dctx, &IID_ID3D11VideoContext, (void **)&d3dvidctx);
+ void *d3dvidctx = NULL;
+ hr = ID3D11DeviceContext_QueryInterface(d3dctx, &IID_ID3D11VideoContext, &d3dvidctx);
if (FAILED(hr)) {
msg_Err(va, "Could not Query ID3D11VideoContext Interface. (hr=0x%lX)", hr);
return VLC_EGENERIC;
@@ -556,8 +556,8 @@ static int DxCreateVideoService(vlc_va_t *va)
{
directx_sys_t *dx_sys = &va->sys->dx_sys;
- ID3D11VideoDevice *d3dviddev = NULL;
- HRESULT hr = ID3D11Device_QueryInterface( dx_sys->d3ddev, &IID_ID3D11VideoDevice, (void **)&d3dviddev);
+ void *d3dviddev = NULL;
+ HRESULT hr = ID3D11Device_QueryInterface(dx_sys->d3ddev, &IID_ID3D11VideoDevice, &d3dviddev);
if (FAILED(hr)) {
msg_Err(va, "Could not Query ID3D11VideoDevice Interface. (hr=0x%lX)", hr);
return VLC_EGENERIC;
--
2.12.1
More information about the vlc-devel
mailing list