diff options
author | v0lt <v0lt@users.sourceforge.net> | 2012-03-05 16:24:27 +0400 |
---|---|---|
committer | v0lt <v0lt@users.sourceforge.net> | 2012-03-05 16:24:27 +0400 |
commit | 4083a47ecc4f1284d7139ba8c48f5e3d50996835 (patch) | |
tree | c95e91aee5f78baeaaf01299bbcd8f053e9e7e3e /src/filters/parser/MP4Splitter/MP4Splitter.cpp | |
parent | 8c11424e20c1a7f53759bb1aa40c40d88e24967c (diff) |
update for previous commit
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4122 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/MP4Splitter/MP4Splitter.cpp')
-rw-r--r-- | src/filters/parser/MP4Splitter/MP4Splitter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/filters/parser/MP4Splitter/MP4Splitter.cpp b/src/filters/parser/MP4Splitter/MP4Splitter.cpp index 4446bd094..03947170c 100644 --- a/src/filters/parser/MP4Splitter/MP4Splitter.cpp +++ b/src/filters/parser/MP4Splitter/MP4Splitter.cpp @@ -1565,12 +1565,13 @@ STDMETHODIMP CMP4SplitterFilter::GetKeyFrames(const GUID* pFormat, REFERENCE_TIM if (AP4_StssAtom* stss = dynamic_cast<AP4_StssAtom*>(track->GetTrakAtom()->FindChild("mdia/minf/stbl/stss"))) {
UINT nKFsTmp = 0;
+ AP4_UI32 mts = track->GetMediaTimeScale();
for (AP4_Cardinal i = 0; i < stss->m_Entries.ItemCount() && nKFsTmp < nKFs; ++i) {
AP4_Sample sample;
if (AP4_SUCCEEDED(track->GetSample(stss->m_Entries[i]-1, sample))) {
- pKFs[nKFsTmp++] = (REFERENCE_TIME)(10000000ui64 * sample.GetCts() / track->GetMediaTimeScale());
- //pKFs[nKFsTmp++] = (REFERENCE_TIME)ceil(10000000.0 * sample.GetCts() / track->GetMediaTimeScale());
+ pKFs[nKFsTmp++] = REFERENCE_TIME((10000000ui64 * sample.GetCts() + mts/2) / mts);
+ //pKFs[nKFsTmp++] = REFERENCE_TIME(10000000.0 * sample.GetCts() / track->GetMediaTimeScale() + 0.5);
}
}
nKFs = nKFsTmp;
|