mkvparser: Segment::Load asserts to error checks.

Change-Id: Ia47a24786789d6f94a786f76e313318e013f4f40
This commit is contained in:
Tom Finegan
2015-08-31 13:38:35 -07:00
parent d0313dd7ce
commit 27a07c1fd1

View File

@@ -1390,10 +1390,8 @@ bool Segment::PreloadCluster(Cluster* pCluster, ptrdiff_t idx) {
} }
long Segment::Load() { long Segment::Load() {
assert(m_clusters == NULL); if (m_clusters != NULL || m_clusterSize != 0 || m_clusterCount != 0)
assert(m_clusterSize == 0); return E_PARSE_FAILED;
assert(m_clusterCount == 0);
// assert(m_size >= 0);
// Outermost (level 0) segment object has been constructed, // Outermost (level 0) segment object has been constructed,
// and pos designates start of payload. We need to find the // and pos designates start of payload. We need to find the