diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2009-06-01 15:03:48 +0400 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2009-06-01 15:03:48 +0400 |
commit | f75d5de3291e6af1d2da16c691c549b24928a5c4 (patch) | |
tree | 598a352ae2fbe638953719a9368a2cad0d8d2a79 /src/filters/parser/matroskasplitter | |
parent | 91f93f4b3330bc3cd8dd2fbd40827c1789d1a7b7 (diff) |
Fixed : crash with Matroska files when Chapter ID is equal to zero
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1139 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/matroskasplitter')
-rw-r--r-- | src/filters/parser/matroskasplitter/MatroskaSplitter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/filters/parser/matroskasplitter/MatroskaSplitter.cpp b/src/filters/parser/matroskasplitter/MatroskaSplitter.cpp index fff5e325f..9f0160fa2 100644 --- a/src/filters/parser/matroskasplitter/MatroskaSplitter.cpp +++ b/src/filters/parser/matroskasplitter/MatroskaSplitter.cpp @@ -665,8 +665,11 @@ void CMatroskaSplitterFilter::SetupChapters(LPCSTR lng, ChapterAtom* parent, int POSITION pos = parent->ChapterAtoms.GetHeadPosition();
while(pos)
{
- // ca == caroot->ChapterAtoms.GetNext(pos) ?
- if(ChapterAtom* ca = m_pFile->m_segment.FindChapterAtom(parent->ChapterAtoms.GetNext(pos)->ChapterUID))
+ // ChapUID zero not allow by Matroska specs
+ UINT64 ChapUID = parent->ChapterAtoms.GetNext(pos)->ChapterUID;
+ ChapterAtom* ca = (ChapUID == 0) ? NULL : m_pFile->m_segment.FindChapterAtom(ChapUID);
+
+ if(ca)
{
CStringW name, first;
|