File tree Expand file tree Collapse file tree
src/filters/renderer/VideoRenderers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -310,30 +310,22 @@ STDMETHODIMP_(bool) CMPCVRAllocatorPresenter::GetFlip()
310310
311311STDMETHODIMP_ (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
339331STDMETHODIMP_ (SIZE ) CMPCVRAllocatorPresenter::GetVideoSizeAR()
You can’t perform that action at this time.
0 commit comments