[vlc-commits] qt: fix uninitialized variable in dcomp compositor
Pierre Lamot
git at videolan.org
Mon May 25 13:56:37 CEST 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Wed May 20 11:35:47 2020 +0200| [c395c4f0b1e28c7892476a794b53e6d594725813] | committer: Pierre Lamot
qt: fix uninitialized variable in dcomp compositor
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c395c4f0b1e28c7892476a794b53e6d594725813
---
modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp | 4 ++++
modules/gui/qt/maininterface/compositor_dcomp_uisurface.hpp | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp b/modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp
index 68e7d27599..173f38bea7 100644
--- a/modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp
+++ b/modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp
@@ -409,9 +409,13 @@ void CompositorDCompositionUISurface::resizeSwapchain(int width, int height)
void CompositorDCompositionUISurface::releaseSharedTexture()
{
if (m_eglInterimTextureQt)
+ {
eglDestroySurface(m_eglDisplay, m_eglInterimTextureQt);
+ m_eglInterimTextureQt = 0;
+ }
if (m_sharedTextureHandled) {
CloseHandle(m_sharedTextureHandled);
+ m_sharedTextureHandled = nullptr;
}
m_d3dInterimTexture.Reset();
m_textureShaderInput.Reset();
diff --git a/modules/gui/qt/maininterface/compositor_dcomp_uisurface.hpp b/modules/gui/qt/maininterface/compositor_dcomp_uisurface.hpp
index 34628ea011..299ee4c1af 100644
--- a/modules/gui/qt/maininterface/compositor_dcomp_uisurface.hpp
+++ b/modules/gui/qt/maininterface/compositor_dcomp_uisurface.hpp
@@ -145,7 +145,7 @@ private:
//Shared texture D3D side
Microsoft::WRL::ComPtr<ID3D11Texture2D> m_d3dInterimTexture;
Microsoft::WRL::ComPtr<ID3D11ShaderResourceView> m_textureShaderInput;
- HANDLE m_sharedTextureHandled;
+ HANDLE m_sharedTextureHandled = nullptr;
//Shared texture D3D side
Microsoft::WRL::ComPtr<ID3D11Device> m_qtd3dDevice;
More information about the vlc-commits
mailing list