[vlc-commits] direct3d11: code cleaning
Steve Lhomme
git at videolan.org
Wed Jul 3 11:54:22 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jul 2 15:46:33 2019 +0200| [605a9106ab326b38f1974d5b00985e7dc9f41f4b] | committer: Steve Lhomme
direct3d11: code cleaning
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=605a9106ab326b38f1974d5b00985e7dc9f41f4b
---
modules/video_output/win32/direct3d11.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 411860d813..f23cd04810 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -858,14 +858,13 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmtp)
.hardware_decoding = is_d3d11_opaque( vd->source.i_chroma ),
};
libvlc_video_direct3d_device_setup_t out;
- ID3D11DeviceContext *d3d11_ctx = NULL;
- if ( sys->setupDeviceCb( &sys->outside_opaque, &cfg, &out ) )
- d3d11_ctx = out.device_context;
- if ( d3d11_ctx == NULL )
+ if ( !sys->setupDeviceCb( &sys->outside_opaque, &cfg, &out ) ||
+ out.device_context == NULL )
{
msg_Err(vd, "Missing external ID3D11DeviceContext");
return VLC_EGENERIC;
}
+ ID3D11DeviceContext *d3d11_ctx = out.device_context;
hr = D3D11_CreateDeviceExternal(vd, d3d11_ctx,
is_d3d11_opaque(vd->source.i_chroma),
&sys->d3d_dev);
More information about the vlc-commits
mailing list