Skip to content

Commit 05a3959

Browse files
committed
Вызываем Flush() при остановке проигрывания. Это избавит от падения при использовании D3D9 VP + DXVA2 декодер в некоторых случаях.
1 parent 63160c3 commit 05a3959

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Source/DXVA2VP.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ IDirect3DSurface9* CDXVA2VP::GetNextInputSurface(const UINT frameNum, const DXVA
426426
void CDXVA2VP::CleanSamples()
427427
{
428428
m_VideoSamples.Clean();
429+
m_VideoSamples.Clear();
429430
}
430431

431432
void CDXVA2VP::SetRectangles(const CRect& srcRect, const CRect& dstRect)

Source/VideoRenderer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ STDMETHODIMP CMpcVideoRenderer::Stop()
704704
m_filterState = State_Stopped;
705705
m_bValidBuffer = false;
706706

707+
m_VideoProcessor->Flush();
708+
707709
return CBaseVideoRenderer2::Stop();
708710
}
709711

0 commit comments

Comments
 (0)