From 54725e038a5066236739b9aab88b490b196635a4 Mon Sep 17 00:00:00 2001 From: Aleksoid Date: Wed, 4 Dec 2024 10:55:27 +1000 Subject: [PATCH] =?UTF-8?q?AudioSwitcher=20-=20=D0=B2=20=D0=BD=D0=B5=D0=BA?= =?UTF-8?q?=D0=BE=D1=82=D0=BE=D1=80=D1=8B=D1=85=20=D1=81=D0=BB=D1=83=D1=87?= =?UTF-8?q?=D0=B0=D1=8F=D1=85=20=D0=BC=D0=BE=D0=B3=20=D0=BD=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B4=D0=BA=D0=BB=D1=8E=D1=87=D0=B8=D1=82=D1=8C=D1=81?= =?UTF-8?q?=D1=8F=20=D0=BA=20MPC=20Audio=20Renderer.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp b/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp index c57d4b05d9..985f379bbf 100644 --- a/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp +++ b/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp @@ -1150,10 +1150,12 @@ HRESULT CStreamSwitcherOutputPin::CompleteConnect(IPin* pReceivePin) && SUCCEEDED(pIn->GetConnected()->ConnectionMediaType(&mt))) { m_pSSF->TransformMediaType(mt, m_bForce16Bit); if (m_mt != mt) { - if (pIn->GetConnected()->QueryAccept(&m_mt) == S_OK) { - hr = m_pFilter->ReconnectPin(pIn->GetConnected(), &m_mt); - } else { - hr = VFW_E_TYPE_NOT_ACCEPTED; + if (auto clsid = GetCLSID(pReceivePin); clsid != CLSID_MpcAudioRenderer && clsid != CLSID_SanearAudioRenderer) { + if (pIn->GetConnected()->QueryAccept(&m_mt) == S_OK) { + hr = m_pFilter->ReconnectPin(pIn->GetConnected(), &m_mt); + } else { + hr = VFW_E_TYPE_NOT_ACCEPTED; + } } } }