diff options
author | v0lt <v0lt@users.sourceforge.net> | 2011-08-24 00:06:47 +0400 |
---|---|---|
committer | v0lt <v0lt@users.sourceforge.net> | 2011-08-24 00:06:47 +0400 |
commit | e404fff6105f0733bbe8cf9dca1a6f1d1042d0f4 (patch) | |
tree | 3745c43ff0747b4948ead699f9d4d523001dcabf /src/filters/parser/MP4Splitter/AP4 | |
parent | 8982072213b51c1fe6160cc0e9d5ee3e19a483f0 (diff) |
MP4Splitter: fixed crash on some movs (micro update for bento4), cosmetics for stream names
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3697 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/MP4Splitter/AP4')
-rw-r--r-- | src/filters/parser/MP4Splitter/AP4/Core/Ap4AtomSampleTable.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/filters/parser/MP4Splitter/AP4/Core/Ap4AtomSampleTable.cpp b/src/filters/parser/MP4Splitter/AP4/Core/Ap4AtomSampleTable.cpp index c142d0193..24b3f97f7 100644 --- a/src/filters/parser/MP4Splitter/AP4/Core/Ap4AtomSampleTable.cpp +++ b/src/filters/parser/MP4Splitter/AP4/Core/Ap4AtomSampleTable.cpp @@ -117,10 +117,15 @@ AP4_AtomSampleTable::GetSample(AP4_Ordinal index, {
AP4_Result result;
+ // check that we have a chunk offset table
+ if (m_StcoAtom == NULL && m_Co64Atom == NULL) {
+ return AP4_ERROR_INVALID_FORMAT;
+ }
+
// MP4 uses 1-based indexes internally, so adjust by one
index++;
- // find out in which chunk this sample is located
+ // find out in which chunk this sample is located
AP4_Ordinal chunk, skip, desc;
result = m_StscAtom->GetChunkForSample(index, chunk, skip, desc);
if (AP4_FAILED(result)) return result;
|