diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2010-08-04 10:04:04 +0400 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2010-08-04 10:04:04 +0400 |
commit | 2b3b33a7412a16a1e73e5b33dd263564e2680093 (patch) | |
tree | 891ebfbfdc129433cfa4b64a142752b8de0fd6b8 /src/filters/parser/MpegSplitter | |
parent | 8ecae9540707573cbbcb0a5238295ac8868fe455 (diff) |
Fix : BD movie length detect wrong, ticket #601
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2190 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/MpegSplitter')
-rw-r--r-- | src/filters/parser/MpegSplitter/MpegSplitter.cpp | 10 | ||||
-rw-r--r-- | src/filters/parser/MpegSplitter/MpegSplitter.h | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/filters/parser/MpegSplitter/MpegSplitter.cpp b/src/filters/parser/MpegSplitter/MpegSplitter.cpp index 4504bca69..3fcec0f97 100644 --- a/src/filters/parser/MpegSplitter/MpegSplitter.cpp +++ b/src/filters/parser/MpegSplitter/MpegSplitter.cpp @@ -364,7 +364,11 @@ HRESULT CMpegSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader) }
}
- if(m_pFile->IsRandomAccess() && m_pFile->m_rate)
+ if(m_rtPlaylistDuration)
+ {
+ m_rtNewStop = m_rtStop = m_rtDuration = m_rtPlaylistDuration;
+ }
+ else if(m_pFile->IsRandomAccess() && m_pFile->m_rate)
{
m_rtNewStop = m_rtStop = m_rtDuration = 10000000i64 * m_pFile->GetLength() / m_pFile->m_rate;
}
@@ -488,8 +492,8 @@ bool CMpegSplitterFilter::DemuxLoop() bool CMpegSplitterFilter::BuildPlaylist(LPCTSTR pszFileName, CAtlList<CHdmvClipInfo::PlaylistItem>& Items)
{
- REFERENCE_TIME rtDuration;
- return SUCCEEDED (m_ClipInfo.ReadPlaylist (pszFileName, rtDuration, Items)) ? true : false;
+ m_rtPlaylistDuration = 0;
+ return SUCCEEDED (m_ClipInfo.ReadPlaylist (pszFileName, m_rtPlaylistDuration, Items)) ? true : false;
}
// IAMStreamSelect
diff --git a/src/filters/parser/MpegSplitter/MpegSplitter.h b/src/filters/parser/MpegSplitter/MpegSplitter.h index cc79972e4..68b1072c7 100644 --- a/src/filters/parser/MpegSplitter/MpegSplitter.h +++ b/src/filters/parser/MpegSplitter/MpegSplitter.h @@ -43,6 +43,8 @@ protected: HRESULT DemuxNextPacket(REFERENCE_TIME rtStartOffset);
+ REFERENCE_TIME m_rtPlaylistDuration;
+
public:
CMpegSplitterFilter(LPUNKNOWN pUnk, HRESULT* phr, const CLSID& clsid = __uuidof(CMpegSplitterFilter));
void SetPipo(bool bPipo) { m_pPipoBimbo = bPipo; };
|