[vlc-commits] d3d11_quad: fix potential leak
Steve Lhomme
git at videolan.org
Wed Oct 17 16:07:39 CEST 2018
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jun 5 11:18:39 2018 +0200| [920bc7ece4cb7c21cb8e38bfd5a9c2a0db018499] | committer: Steve Lhomme
d3d11_quad: fix potential leak
(cherry picked from commit 87b4750d6fefc562dd31c140755c51962a47c9ee)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=920bc7ece4cb7c21cb8e38bfd5a9c2a0db018499
---
modules/video_output/win32/d3d11_quad.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/win32/d3d11_quad.c b/modules/video_output/win32/d3d11_quad.c
index 814ad4fafa..d9eea3a1cc 100644
--- a/modules/video_output/win32/d3d11_quad.c
+++ b/modules/video_output/win32/d3d11_quad.c
@@ -526,6 +526,7 @@ static void SetupQuadCube(d3d_vertex_t *dst_data, const RECT *output,
bool D3D11_UpdateQuadPosition( vlc_object_t *o, d3d11_device_t *d3d_dev, d3d_quad_t *quad,
const RECT *output, video_orientation_t orientation )
{
+ bool result = true;
HRESULT hr;
D3D11_MAPPED_SUBRESOURCE mappedResource;
@@ -562,13 +563,13 @@ bool D3D11_UpdateQuadPosition( vlc_object_t *o, d3d11_device_t *d3d_dev, d3d_qua
break;
default:
msg_Warn(o, "Projection mode %d not handled", quad->projection);
- return false;
+ result = false;
}
ID3D11DeviceContext_Unmap(d3d_dev->d3dcontext, (ID3D11Resource *)quad->pIndexBuffer, 0);
ID3D11DeviceContext_Unmap(d3d_dev->d3dcontext, (ID3D11Resource *)quad->pVertexBuffer, 0);
- return true;
+ return result;
}
static bool D3D11_ShaderUpdateConstants(vlc_object_t *o, d3d11_device_t *d3d_dev, d3d_quad_t *quad)
More information about the vlc-commits
mailing list