Skip to content

Commit 908a489

Browse files
committed
"originalVideoSize" переделано на Flt_GetInt64().
1 parent b461201 commit 908a489

1 file changed

Lines changed: 8 additions & 16 deletions

File tree

src/filters/renderer/VideoRenderers/MPCVRAllocatorPresenter.cpp

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -310,30 +310,22 @@ STDMETHODIMP_(bool) CMPCVRAllocatorPresenter::GetFlip()
310310

311311
STDMETHODIMP_(SIZE) CMPCVRAllocatorPresenter::GetVideoSize()
312312
{
313-
SIZE Size = {};
313+
SIZE size = {};
314314
if (CComQIPtr<IExFilterConfig> pIExFilterConfig = m_pMPCVR.p) {
315-
unsigned size = 0;
316-
LPVOID pSize = nullptr;
317-
if (SUCCEEDED(pIExFilterConfig->Flt_GetBin("originalVideoSize", &pSize, &size))) {
318-
bool bOk = false;
319-
if (size == sizeof(long) * 2) {
320-
bOk = true;
321-
memcpy(&Size.cx, pSize, sizeof(Size.cx));
322-
memcpy(&Size.cy, reinterpret_cast<BYTE*>(pSize) + sizeof(Size.cx), sizeof(Size.cy));
323-
}
324-
LocalFree(pSize);
315+
__int64 sizei64;
316+
if (SUCCEEDED(pIExFilterConfig->Flt_GetInt64("originalVideoSize", &sizei64))) {
317+
size.cx = static_cast<long>(sizei64 >> 32);
318+
size.cy = static_cast<long>(sizei64 & 0xFFFFFFFF);
325319

326-
if (bOk) {
327-
return Size;
328-
}
320+
return size;
329321
}
330322
}
331323
if (CComQIPtr<IBasicVideo> pBV = m_pMPCVR.p) {
332324
// Final size of the video, after all scaling and cropping operations
333325
// This is also aspect ratio adjusted
334-
pBV->GetVideoSize(&Size.cx, &Size.cy);
326+
pBV->GetVideoSize(&size.cx, &size.cy);
335327
}
336-
return Size;
328+
return size;
337329
}
338330

339331
STDMETHODIMP_(SIZE) CMPCVRAllocatorPresenter::GetVideoSizeAR()

0 commit comments

Comments
 (0)