@@ -1051,7 +1051,7 @@ BOOL CDX9VideoProcessor::GetAlignmentSize(const CMediaType& mt, SIZE& Size)
10511051 else {
10521052 CComPtr<IDirect3DSurface9> pSurface;
10531053 if (m_DXVA2VP.IsReady ()) {
1054- pSurface = m_DXVA2VP.GetNextInputSurface (0 , 0 , m_CurrentSampleFmt);
1054+ pSurface = m_DXVA2VP.GetNextInputSurface (0 , m_CurrentSampleFmt);
10551055 } else {
10561056 pSurface = m_TexSrcVideo.pSurface ;
10571057 }
@@ -1431,14 +1431,11 @@ HRESULT CDX9VideoProcessor::CopySample(IMediaSample* pSample)
14311431 }
14321432
14331433 if (m_DXVA2VP.IsReady ()) {
1434- const REFERENCE_TIME start_100ns = m_pFilter->m_FrameStats .GetFrames () * 170000i64;
1435- const REFERENCE_TIME end_100ns = start_100ns + 170000i64;
1436-
14371434 if (m_DXVA2VP.GetNumRefSamples () > 1 ) {
1438- IDirect3DSurface9* pDXVA2VPSurface = m_DXVA2VP.GetNextInputSurface (start_100ns, end_100ns , m_CurrentSampleFmt);
1435+ IDirect3DSurface9* pDXVA2VPSurface = m_DXVA2VP.GetNextInputSurface (m_pFilter-> m_FrameStats . GetFrames () , m_CurrentSampleFmt);
14391436 hr = m_pD3DDevEx->StretchRect (pSurface, nullptr , pDXVA2VPSurface, nullptr , D3DTEXF_NONE);
14401437 } else {
1441- m_DXVA2VP.SetInputSurface (pSurface, start_100ns, end_100ns , m_CurrentSampleFmt);
1438+ m_DXVA2VP.SetInputSurface (pSurface, m_pFilter-> m_FrameStats . GetFrames () , m_CurrentSampleFmt);
14421439 }
14431440 }
14441441 else if (m_TexSrcVideo.Plane2 .pSurface ) {
@@ -1477,10 +1474,7 @@ HRESULT CDX9VideoProcessor::CopySample(IMediaSample* pSample)
14771474 D3DLOCKED_RECT lr;
14781475
14791476 if (m_DXVA2VP.IsReady ()) {
1480- const REFERENCE_TIME start_100ns = m_pFilter->m_FrameStats .GetFrames () * 170000i64;
1481- const REFERENCE_TIME end_100ns = start_100ns + 170000i64;
1482-
1483- IDirect3DSurface9* pDXVA2VPSurface = m_DXVA2VP.GetNextInputSurface (start_100ns, end_100ns, m_CurrentSampleFmt);
1477+ IDirect3DSurface9* pDXVA2VPSurface = m_DXVA2VP.GetNextInputSurface (m_pFilter->m_FrameStats .GetFrames (), m_CurrentSampleFmt);
14841478
14851479 hr = pDXVA2VPSurface->LockRect (&lr, nullptr , D3DLOCK_DISCARD|D3DLOCK_NOSYSLOCK);
14861480 if (S_OK == hr) {
0 commit comments