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-01-26 15:13:27 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2014-01-26 15:13:27 +0400
commiteaf38b059d48324aba5c7a8011511d8435341e25 (patch)
tree4578e142cad49d653579d694436873cc37feb2ac /demuxer/LAVSplitter
parentd7a05e7ee1867713390d94672a9031b0c30cd4e6 (diff)
Move the EC_LENGTH_CHANGED event to after actually executing the change.
Diffstat (limited to 'demuxer/LAVSplitter')
-rw-r--r--demuxer/LAVSplitter/LAVSplitter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/demuxer/LAVSplitter/LAVSplitter.cpp b/demuxer/LAVSplitter/LAVSplitter.cpp
index db15ca5c..592a9cbf 100644
--- a/demuxer/LAVSplitter/LAVSplitter.cpp
+++ b/demuxer/LAVSplitter/LAVSplitter.cpp
@@ -1297,10 +1297,9 @@ STDMETHODIMP CLAVSplitter::Enable(long lIndex, DWORD dwFlags)
int idx = (lIndex - j);
int num_titles = m_pDemuxer->GetNumTitles();
if (num_titles > 1 && idx >= 0 && idx < num_titles) {
+ DbgLog((LOG_TRACE, 10, L"Setting title to %d", idx));
HRESULT hr = m_pDemuxer->SetTitle(idx);
if (SUCCEEDED(hr)) {
- // Notify the player about the length change
- NotifyEvent(EC_LENGTH_CHANGED, 0, 0);
// Perform a seek to the start of the new title
IMediaSeeking *pSeek = nullptr;
hr = m_pGraph->QueryInterface(&pSeek);
@@ -1309,6 +1308,9 @@ STDMETHODIMP CLAVSplitter::Enable(long lIndex, DWORD dwFlags)
pSeek->SetPositions(&current, AM_SEEKING_AbsolutePositioning, nullptr, AM_SEEKING_NoPositioning);
SafeRelease(&pSeek);
}
+ // Notify the player about the length change
+ DbgLog((LOG_TRACE, 10, L"Title change complete, signaling player"));
+ NotifyEvent(EC_LENGTH_CHANGED, 0, 0);
}
}
return S_FALSE;