diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2011-10-31 14:05:07 +0400 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2011-10-31 14:05:07 +0400 |
commit | ec5813234bcb09e487b90c79b3b06fb9e6107845 (patch) | |
tree | 6a384fea2928bdf81778b68a2dd7f9772997509c /src/filters/parser | |
parent | 3a228a4df1a0999f3126f991e7efdd01312143c5 (diff) |
Change : Disable C4067 warning;
Fix : MPEGSplitter - correct calculate duration on stream with abnormal pts/dts value; Small speed optimization at opening the file;
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3798 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser')
-rw-r--r-- | src/filters/parser/MpegSplitter/MpegSplitterFile.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp b/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp index 7fc143db7..43099bda0 100644 --- a/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp +++ b/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp @@ -413,7 +413,7 @@ HRESULT CMpegSplitterFile::SearchStreams(__int64 start, __int64 stop, IAsyncRead }
if(h2.fpts && CalcDuration && GetMasterStream() && GetMasterStream()->GetHead() == h.pid) {
- if(m_rtMin == _I64_MAX) {
+ if((m_rtMin == _I64_MAX) || (m_rtMin > h2.pts)) {
m_rtMin = h2.pts;
m_posMin = GetPos();
TRACE ("m_rtMin(SearchStreams)=%S, PID=%d\n", ReftimeToString(m_rtMin), h.pid);
@@ -440,14 +440,15 @@ HRESULT CMpegSplitterFile::SearchStreams(__int64 start, __int64 stop, IAsyncRead }
}
}
- //TRACE ("m_rtMax(SearchStreams)=%S\n", ReftimeToString(m_rtMax));
}
}
} else {
b = 0;
}
- AddStream(h.pid, b, DWORD(h.bytes - (GetPos() - pos)));
+ if(!CalcDuration) {
+ AddStream(h.pid, b, DWORD(h.bytes - (GetPos() - pos)));
+ }
}
Seek(h.next);
|