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 | |
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
-rw-r--r-- | src/filters/parser/MpegSplitter/MpegSplitterFile.cpp | 7 | ||||
-rw-r--r-- | src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp | 2 |
2 files changed, 5 insertions, 4 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);
diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp index 443ed582f..45a8f99e7 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp +++ b/src/filters/transform/MPCVideoDec/MPCVideoDecFilter.cpp @@ -987,7 +987,7 @@ void CMPCVideoDecFilter::CalcAvgTimePerFrame() void CMPCVideoDecFilter::LogLibAVCodec(void* par,int level,const char *fmt,va_list valist)
{
-#ifdef _DEBUG && 0
+#if defined(_DEBUG) && 0
char Msg [500];
vsnprintf_s (Msg, sizeof(Msg), _TRUNCATE, fmt, valist);
TRACE("AVLIB : %s", Msg);
|