[vlc-commits] direct3d11: fix use of uninitialized data when init fails
Steve Lhomme
git at videolan.org
Tue Jun 21 11:35:49 CEST 2016
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Tue Jun 21 09:57:38 2016 +0200| [abb9df49182125c7bc7cad345010e0aca19bf66f] | committer: Hugo Beauzée-Luyssen
direct3d11: fix use of uninitialized data when init fails
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=abb9df49182125c7bc7cad345010e0aca19bf66f
---
modules/video_output/win32/direct3d11.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 37a04fb..68b1bb1 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1609,15 +1609,30 @@ error:
static void ReleaseQuad(d3d_quad_t *quad)
{
if (quad->pVertexBuffer)
+ {
ID3D11Buffer_Release(quad->pVertexBuffer);
+ quad->pVertexBuffer = NULL;
+ }
if (quad->pTexture)
+ {
ID3D11Texture2D_Release(quad->pTexture);
+ quad->pTexture = NULL;
+ }
if (quad->d3dresViewY)
+ {
ID3D11ShaderResourceView_Release(quad->d3dresViewY);
+ quad->d3dresViewY = NULL;
+ }
if (quad->d3dresViewUV)
+ {
ID3D11ShaderResourceView_Release(quad->d3dresViewUV);
+ quad->d3dresViewUV = NULL;
+ }
if (quad->d3dpixelShader)
+ {
ID3D11VertexShader_Release(quad->d3dpixelShader);
+ quad->d3dpixelShader = NULL;
+ }
}
static void Direct3D11DestroyResources(vout_display_t *vd)
More information about the vlc-commits
mailing list