diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2011-06-07 04:37:45 +0400 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2011-06-07 04:37:45 +0400 |
commit | 105cb761edbeeeae1cbd4666c224bc9415aa9c38 (patch) | |
tree | e04ed74b95dac36661d2f97fb66cbbbd47162435 /src/filters/parser/MpegSplitter | |
parent | 1a78b4af6d67d5f7497e13b04c14418961b362e7 (diff) |
Fix : Disable MVC parser support, it's broken normal MPG/VOB playback and seek;
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3191 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/MpegSplitter')
-rw-r--r-- | src/filters/parser/MpegSplitter/MpegSplitterFile.cpp | 36 | ||||
-rw-r--r-- | src/filters/parser/MpegSplitter/MpegSplitterFile.h | 10 |
2 files changed, 30 insertions, 16 deletions
diff --git a/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp b/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp index 8eed00261..4e4b47988 100644 --- a/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp +++ b/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp @@ -172,18 +172,16 @@ HRESULT CMpegSplitterFile::Init(IAsyncReader* pAsyncReader) }
// Add fake Subtitle stream ...
- if(m_type == ts) {
- if(m_streams[video].GetCount()) {
- if (!m_bIsHdmv && m_streams[subpic].GetCount()) {
- stream s;
- s.pid = NO_SUBTITLE_PID;
- s.mt.majortype = m_streams[subpic].GetHead().mt.majortype;
- s.mt.subtype = m_streams[subpic].GetHead().mt.subtype;
- s.mt.formattype = m_streams[subpic].GetHead().mt.formattype;
- m_streams[subpic].Insert(s, this);
- } else {
- AddHdmvPGStream(NO_SUBTITLE_PID, "---");
- }
+ if(m_streams[video].GetCount()) {
+ if (!m_bIsHdmv && m_streams[subpic].GetCount()) {
+ stream s;
+ s.pid = NO_SUBTITLE_PID;
+ s.mt.majortype = m_streams[subpic].GetHead().mt.majortype;
+ s.mt.subtype = m_streams[subpic].GetHead().mt.subtype;
+ s.mt.formattype = m_streams[subpic].GetHead().mt.formattype;
+ m_streams[subpic].Insert(s, this);
+ } else {
+ AddHdmvPGStream(NO_SUBTITLE_PID, "---");
}
}
@@ -488,13 +486,19 @@ DWORD CMpegSplitterFile::AddStream(WORD pid, BYTE pesid, DWORD len) // and can also be split into multiple packets
if (!avch.Lookup(pid))
memset(&avch[pid], 0, sizeof(CMpegSplitterFile::avchdr));
-
- if(!m_streams[video].Find(s) && !m_streams[stereo].Find(s) && Read(avch[pid], len, &s.mt)) {
+#if defined(MVC_SUPPORT)
+ if(!m_streams[video].Find(s) && !m_streams[stereo].Find(s) && Read(avch[pid], len, &s.mt))
+ {
if (avch[pid].spspps[index_subsetsps].complete)
- type = stereo;
+ type = 4;
else
type = video;
}
+#else
+ if(!m_streams[video].Find(s) && Read(avch[pid], len, &s.mt)) {
+ type = video;
+ }
+#endif
}
} else if(pesid >= 0xc0 && pesid < 0xe0) { // mpeg audio
__int64 pos = GetPos();
@@ -721,7 +725,9 @@ CAtlList<CMpegSplitterFile::stream>* CMpegSplitterFile::GetMasterStream() !m_streams[video].IsEmpty() ? &m_streams[video] :
!m_streams[audio].IsEmpty() ? &m_streams[audio] :
!m_streams[subpic].IsEmpty() ? &m_streams[subpic] :
+#if defined(MVC_SUPPORT)
!m_streams[stereo].IsEmpty() ? &m_streams[stereo] :
+#endif
NULL;
}
diff --git a/src/filters/parser/MpegSplitter/MpegSplitterFile.h b/src/filters/parser/MpegSplitter/MpegSplitterFile.h index f2ecee5af..7c5e23471 100644 --- a/src/filters/parser/MpegSplitter/MpegSplitterFile.h +++ b/src/filters/parser/MpegSplitter/MpegSplitterFile.h @@ -31,6 +31,8 @@ #define ISVALIDPID(pid) (pid >= 0x10 && pid < 0x1fff)
+//#define MVC_SUPPORT
+
class CMpegSplitterFile : public CBaseSplitterFileEx
{
CAtlMap<WORD, BYTE> m_pid2pes;
@@ -74,7 +76,11 @@ public: }
};
- enum {video, audio, subpic, stereo, unknown};
+ enum {video, audio, subpic,
+#if defined(MVC_SUPPORT)
+ stereo,
+#endif
+ unknown};
class CStreamList : public CAtlList<stream>
{
@@ -97,7 +103,9 @@ public: type == video ? L"Video" :
type == audio ? L"Audio" :
type == subpic ? L"Subtitle" :
+#if defined(MVC_SUPPORT)
type == stereo ? L"Stereo" :
+#endif
L"Unknown";
}
|