diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2011-06-17 08:56:53 +0400 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2011-06-17 08:56:53 +0400 |
commit | 2c947a4e9f9720ce9006012f4ae9c5301035c9af (patch) | |
tree | 0f3014ef40999aeb10ee6e28671df3f3888d6058 /src/filters/parser/MpegSplitter | |
parent | b1ffee5ac68ccb40990d7037aa7c27d407d13555 (diff) |
Fix : MPEGSplitter - improve VC-1 parser, fix for rev. 3136; Thanks to v0lt for the tip and sample.
Fix : uninitialized some variables.
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3240 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/MpegSplitter')
-rw-r--r-- | src/filters/parser/MpegSplitter/MpegSplitterFile.cpp | 22 | ||||
-rw-r--r-- | src/filters/parser/MpegSplitter/MpegSplitterFile.h | 1 |
2 files changed, 20 insertions, 3 deletions
diff --git a/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp b/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp index d2454ec21..12ddb4fe6 100644 --- a/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp +++ b/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp @@ -451,8 +451,19 @@ DWORD CMpegSplitterFile::AddStream(WORD pid, BYTE pesid, DWORD len) s.pesid = pesid;
int type = unknown;
-
- if(pesid >= 0xe0 && pesid < 0xf0) { // mpeg video
+ bool vc1_frame_found = false;
+
+ if(m_VC1_streams.Lookup(s.pid, vc1_frame_found) && (vc1_frame_found)) {
+ CMpegSplitterFile::vc1hdr h;
+ if(!m_streams[video].Find(s) && Read(h, len, &s.mt, m_nVC1_GuidFlag)) {
+ if(h.frame_found) {
+ m_VC1_streams[s.pid] = true;
+ return s;
+ } else {
+ type = video;
+ }
+ }
+ } else if(pesid >= 0xe0 && pesid < 0xf0) { // mpeg video
__int64 pos = GetPos();
if(type == unknown) {
@@ -526,7 +537,12 @@ DWORD CMpegSplitterFile::AddStream(WORD pid, BYTE pesid, DWORD len) Seek(pos);
CMpegSplitterFile::vc1hdr h;
if(!m_streams[video].Find(s) && Read(h, len, &s.mt, m_nVC1_GuidFlag)) {
- type = video;
+ if(h.frame_found) {
+ m_VC1_streams[s.pid] = true;
+ return s;
+ } else {
+ type = video;
+ }
}
}
diff --git a/src/filters/parser/MpegSplitter/MpegSplitterFile.h b/src/filters/parser/MpegSplitter/MpegSplitterFile.h index 4114b90b5..1bb9f7aff 100644 --- a/src/filters/parser/MpegSplitter/MpegSplitterFile.h +++ b/src/filters/parser/MpegSplitter/MpegSplitterFile.h @@ -154,4 +154,5 @@ public: const program* FindProgram(WORD pid, int &iStream, const CHdmvClipInfo::Stream * &_pClipInfo);
CAtlMap<DWORD, CString> m_pPMT_Lang;
+ CAtlMap<WORD, bool> m_VC1_streams;
};
|