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,13 +310,30 @@ STDMETHODIMP_(bool) CMPCVRAllocatorPresenter::GetFlip()
310310
311311STDMETHODIMP_ (SIZE ) CMPCVRAllocatorPresenter::GetVideoSize()
312312{
313- SIZE size = {0 , 0 };
313+ SIZE Size = {};
314+ 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);
325+
326+ if (bOk) {
327+ return Size;
328+ }
329+ }
330+ }
314331 if (CComQIPtr<IBasicVideo> pBV = m_pMPCVR.p ) {
315332 // Final size of the video, after all scaling and cropping operations
316333 // This is also aspect ratio adjusted
317- pBV->GetVideoSize (&size .cx , &size .cy );
334+ pBV->GetVideoSize (&Size .cx , &Size .cy );
318335 }
319- return size ;
336+ return Size ;
320337}
321338
322339STDMETHODIMP_ (SIZE ) CMPCVRAllocatorPresenter::GetVideoSizeAR()
You can’t perform that action at this time.
0 commit comments