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>2013-03-27 21:08:23 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2013-03-27 21:10:54 +0400
commitd9a6d72a80ad0dbb622cc77e266fa92827aad772 (patch)
tree0c19b43ac7bb58a93a16ea9ba9fd77a3fd1e4ea9 /decoder
parent9ef0cef02362602d6edce84ef875d293e0de9ce3 (diff)
Set discontinuity on output samples after flushing/resync
Diffstat (limited to 'decoder')
-rw-r--r--decoder/LAVAudio/LAVAudio.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/decoder/LAVAudio/LAVAudio.cpp b/decoder/LAVAudio/LAVAudio.cpp
index cbc452ca..f8dcb3a2 100644
--- a/decoder/LAVAudio/LAVAudio.cpp
+++ b/decoder/LAVAudio/LAVAudio.cpp
@@ -1568,11 +1568,11 @@ HRESULT CLAVAudio::Receive(IMediaSample *pIn)
if(pIn->IsDiscontinuity() == S_OK || (m_bNeedSyncpoint && pIn->IsSyncPoint() == S_OK)) {
DbgLog((LOG_ERROR, 10, L"::Receive(): Discontinuity, flushing decoder.."));
- m_bDiscontinuity = TRUE;
m_buff.SetSize(0);
FlushOutput(FALSE);
FlushDecoder();
m_bQueueResync = TRUE;
+ m_bDiscontinuity = TRUE;
if(FAILED(hr)) {
DbgLog((LOG_ERROR, 10, L" -> Discontinuity without timestamp"));
}
@@ -1586,6 +1586,9 @@ HRESULT CLAVAudio::Receive(IMediaSample *pIn)
if(m_bQueueResync && SUCCEEDED(hr)) {
DbgLog((LOG_TRACE, 10, L"Resync Request; old: %I64d; new: %I64d; buffer: %d", m_rtStart, rtStart, m_buff.GetCount()));
FlushOutput();
+ if (rtStart != m_rtStart)
+ m_bDiscontinuity = TRUE;
+
m_rtStart = rtStart;
m_rtStartInputCache = AV_NOPTS_VALUE;
m_rtBitstreamCache = AV_NOPTS_VALUE;