Skip to content

Commit f6fe2b4

Browse files
Aleksoid1978v0lt
authored andcommitted
Не вызываем CVideoProcessor::InitMediaType, когда это не требуется.
1 parent 614c4cd commit f6fe2b4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Source/DX9VideoProcessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ BOOL CDX9VideoProcessor::VerifyMediaType(const CMediaType* pmt)
10341034

10351035
BOOL CDX9VideoProcessor::GetAlignmentSize(const CMediaType& mt, SIZE& Size)
10361036
{
1037-
if (InitMediaType(&mt)) {
1037+
if ((m_srcDXVA2Format != D3DFMT_UNKNOWN && mt == m_pFilter->m_inputMT) || InitMediaType(&mt)) {
10381038
const auto& FmtParams = GetFmtConvParams(&mt);
10391039

10401040
if (FmtParams.cformat == CF_RGB24) {

Source/VideoRenderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ HRESULT CMpcVideoRenderer::SetMediaType(const CMediaType *pmt)
445445
}
446446
}
447447

448-
if (!m_VideoProcessor->InitMediaType(&mt)) {
448+
if (mt != m_inputMT && !m_VideoProcessor->InitMediaType(&mt)) {
449449
return VFW_E_UNSUPPORTED_VIDEO;
450450
}
451451

0 commit comments

Comments
 (0)