Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2014-02-02 15:19:04 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2014-02-02 15:24:55 +0400
commit703b7dce84a52a9f6064769bafe5d67d0bb26607 (patch)
tree75f997c8d91c0840b60e937d84b1f960788baaae /demuxer
parent2fb31099e2bf0bbb7ec4c680a18fe2329945a26a (diff)
Block WMP/WMC from overwriting the initial track choice.
Diffstat (limited to 'demuxer')
-rw-r--r--demuxer/LAVSplitter/LAVSplitter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/demuxer/LAVSplitter/LAVSplitter.cpp b/demuxer/LAVSplitter/LAVSplitter.cpp
index 592a9cbf..6340e86d 100644
--- a/demuxer/LAVSplitter/LAVSplitter.cpp
+++ b/demuxer/LAVSplitter/LAVSplitter.cpp
@@ -1115,6 +1115,11 @@ STDMETHODIMP CLAVSplitter::RenameOutputPin(DWORD TrackNumSrc, DWORD TrackNumDst,
CheckPointer(m_pDemuxer, E_UNEXPECTED);
if (TrackNumSrc == TrackNumDst) return S_OK;
+ // WMP/WMC like to always enable the first track, overwriting any initial stream choice
+ // So instead block it from doing anything here.
+ if (!m_bPlaybackStarted && (m_processName == L"wmplayer.exe" || m_processName == L"ehshell.exe"))
+ return S_OK;
+
CLAVOutputPin* pPin = GetOutputPin(TrackNumSrc);
DbgLog((LOG_TRACE, 20, L"::RenameOutputPin() - Switching %s Stream %d to %d", CBaseDemuxer::CStreamList::ToStringW(pPin->GetPinType()), TrackNumSrc, TrackNumDst));