From 379839bedcb0719e3fa4f19e789e060a3572abd8 Mon Sep 17 00:00:00 2001 From: matthewjheaney Date: Wed, 7 Mar 2012 10:47:26 -0500 Subject: [PATCH] simplified segment::load() Change-Id: I92793d405ee24f2d94a6a6a251a5bada4f0d40a8 --- mkvparser.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mkvparser.cpp b/mkvparser.cpp index 7797c45..48371e4 100644 --- a/mkvparser.cpp +++ b/mkvparser.cpp @@ -2375,6 +2375,18 @@ long Segment::Load() assert(m_pInfo); assert(m_pTracks); +#if 1 + for (;;) + { + const int status = LoadCluster(); + + if (status < 0) //error + return status; + + if (status >= 1) //no more clusters + return 0; + } +#else long long total, avail; long status = m_pReader->Length(&total, &avail); @@ -2544,6 +2556,7 @@ long Segment::Load() #endif return 0; +#endif //xxx }