From eba99f69682d7748f0944b0fcd250649c6fc27fc Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sat, 28 Jul 2018 06:29:34 +1000 Subject: [PATCH] [host] fix compiler warnings --- host/MFT/H264.cpp | 2 +- host/TextureConverter.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/host/MFT/H264.cpp b/host/MFT/H264.cpp index dcaf85f8..c5e2d667 100644 --- a/host/MFT/H264.cpp +++ b/host/MFT/H264.cpp @@ -359,7 +359,7 @@ bool MFT::H264::GetFrame(void * buffer, const size_t bufferSize, unsigned int & outDataBuffer.pSample->ConvertToContiguousBuffer(&mb); BYTE *pixels; - DWORD maxLen, curLen; + DWORD curLen; mb->Lock(&pixels, NULL, &curLen); memcpy(buffer, pixels, curLen); mb->Unlock(); diff --git a/host/TextureConverter.cpp b/host/TextureConverter.cpp index e6fae790..fb3b0e4c 100644 --- a/host/TextureConverter.cpp +++ b/host/TextureConverter.cpp @@ -370,10 +370,10 @@ bool TextureConverter::Convert(ID3D11Texture2DPtr texture, TextureList & output) D3D11_TEXTURE2D_DESC srcDesc; src->GetDesc(&srcDesc); - srcDesc.Width *= m_scaleFormats[i]; - srcDesc.Height *= m_scaleFormats[i]; - viewPorts[0].Width = srcDesc.Width; - viewPorts[0].Height = srcDesc.Height; + viewPorts[0].Width = srcDesc.Width * m_scaleFormats[i]; + viewPorts[0].Height = srcDesc.Height * m_scaleFormats[i]; + srcDesc.Width = (UINT)viewPorts[0].Width; + srcDesc.Height = (UINT)viewPorts[0].Height; result = m_device->CreateTexture2D(&srcDesc, NULL, &dest); if (FAILED(result))