Skip to content

Commit 62592e4

Browse files
committed
Уменьшено количество приведений типов.
1 parent f022938 commit 62592e4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Source/DX11VideoProcessor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,8 +2261,8 @@ HRESULT CDX11VideoProcessor::CopySample(IMediaSample* pSample)
22612261
}
22622262

22632263
BYTE* data = nullptr;
2264-
const long size = pSample->GetActualDataLength();
2265-
if (size >= static_cast<long>(abs(m_srcPitch) * m_srcLines) && S_OK == pSample->GetPointer(&data)) {
2264+
const int size = pSample->GetActualDataLength();
2265+
if (size >= abs(m_srcPitch) * (int)m_srcLines && S_OK == pSample->GetPointer(&data)) {
22662266
// do not use UpdateSubresource for D3D11 VP here
22672267
// because it can cause green screens and freezes on some configurations
22682268
hr = MemCopyToTexSrcVideo(data, m_srcPitch);

Source/DX9VideoProcessor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,8 +1468,8 @@ HRESULT CDX9VideoProcessor::CopySample(IMediaSample* pSample)
14681468
}
14691469

14701470
BYTE* data = nullptr;
1471-
const long size = pSample->GetActualDataLength();
1472-
if (size >= static_cast<long>(abs(m_srcPitch) * m_srcLines) && S_OK == pSample->GetPointer(&data)) {
1471+
const int size = pSample->GetActualDataLength();
1472+
if (size >= abs(m_srcPitch) * (int)m_srcLines && S_OK == pSample->GetPointer(&data)) {
14731473
if (m_srcParams.cformat == CF_NONE) {
14741474
return E_FAIL;
14751475
}

0 commit comments

Comments
 (0)