From c589ee9d47d9f00aa4be32c5832a44ce466f014d Mon Sep 17 00:00:00 2001 From: tmccolm Date: Fri, 23 Jun 2006 19:48:03 +0000 Subject: 2006/06/23 tmccolm --- src/h__Reader.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/h__Reader.cpp') diff --git a/src/h__Reader.cpp b/src/h__Reader.cpp index 1ebc5d4..2179ca6 100755 --- a/src/h__Reader.cpp +++ b/src/h__Reader.cpp @@ -108,19 +108,23 @@ ASDCP::h__Reader::OpenMXFRead(const char* filename) if ( ASDCP_SUCCESS(result) ) result = m_HeaderPart.InitFromFile(m_File); - // if this is a three partition file, go to the body - // partition and read off the partition pack - if ( m_HeaderPart.m_RIP.PairArray.size() == 3 ) + if ( ASDCP_SUCCESS(result) ) { - Array::iterator r_i = m_HeaderPart.m_RIP.PairArray.begin(); - r_i++; - m_File.Seek((*r_i).ByteOffset); + // if this is a three partition file, go to the body + // partition and read the partition pack + if ( m_HeaderPart.m_RIP.PairArray.size() == 3 ) + { + Array::iterator r_i = m_HeaderPart.m_RIP.PairArray.begin(); + r_i++; + m_File.Seek((*r_i).ByteOffset); - result = m_BodyPart.InitFromFile(m_File); + result = m_BodyPart.InitFromFile(m_File); + } + + m_EssenceStart = m_File.Tell(); } - m_EssenceStart = m_File.Tell(); - return RESULT_OK; + return result; } -- cgit v1.2.3