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>2012-10-12 22:52:23 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2012-10-12 22:53:27 +0400
commitfaca3af8068d0fad47aa9e654aa8bd26d38328be (patch)
treeaf58ff6c9b36359137a9c75e76c40f673c399c84 /decoder/LAVVideo
parent7cc3dd28ed846fa6eb212fd843bb60b8097978f2 (diff)
Perform a decoder flush on :EndFlush when playing DVDs, because no NewSegment is sent.
Diffstat (limited to 'decoder/LAVVideo')
-rw-r--r--decoder/LAVVideo/LAVVideo.cpp7
-rw-r--r--decoder/LAVVideo/LAVVideo.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/decoder/LAVVideo/LAVVideo.cpp b/decoder/LAVVideo/LAVVideo.cpp
index 03c353ec..0c12127f 100644
--- a/decoder/LAVVideo/LAVVideo.cpp
+++ b/decoder/LAVVideo/LAVVideo.cpp
@@ -61,6 +61,7 @@ CLAVVideo::CLAVVideo(LPUNKNOWN pUnk, HRESULT* phr)
, m_pSubtitleInput(NULL)
, m_SubtitleConsumer(NULL)
, m_pLastSequenceFrame(NULL)
+ , m_bDVDPlayback(NULL)
{
*phr = S_OK;
m_pInput = new CDeCSSTransformInputPin(TEXT("CDeCSSTransformInputPin"), this, phr, L"Input");
@@ -584,6 +585,7 @@ HRESULT CLAVVideo::CreateDecoder(const CMediaType *pmt)
m_bH264IsAVI = (codec == AV_CODEC_ID_H264 && ((m_LAVPinInfoValid && (m_LAVPinInfo.flags & LAV_STREAM_FLAG_H264_DTS)) || (!m_LAVPinInfoValid && pszExtension && _wcsicmp(pszExtension, L".avi") == 0)));
m_bLAVSplitter = FilterInGraph(PINDIR_INPUT, CLSID_LAVSplitterSource) || FilterInGraph(PINDIR_INPUT, CLSID_LAVSplitter);
+ m_bDVDPlayback = (pmt->majortype == MEDIATYPE_DVD_ENCRYPTED_PACK);
SAFE_CO_FREE(pszExtension);
@@ -651,6 +653,11 @@ HRESULT CLAVVideo::EndFlush()
DbgLog((LOG_TRACE, 1, L"::EndFlush"));
CAutoLock cAutoLock(&m_csReceive);
ReleaseFrame(&m_pLastSequenceFrame);
+
+ if (m_bDVDPlayback) {
+ PerformFlush();
+ }
+
HRESULT hr = __super::EndFlush();
m_bFlushing = FALSE;
return hr;
diff --git a/decoder/LAVVideo/LAVVideo.h b/decoder/LAVVideo/LAVVideo.h
index b4838d40..962f6186 100644
--- a/decoder/LAVVideo/LAVVideo.h
+++ b/decoder/LAVVideo/LAVVideo.h
@@ -210,6 +210,7 @@ private:
BOOL m_bH264IsAVI;
BOOL m_bLAVSplitter;
BOOL m_bStreamARBlacklisted;
+ BOOL m_bDVDPlayback;
AVFilterGraph *m_pFilterGraph;
AVFilterContext *m_pFilterBufferSrc;