From de10f4a1f35fce05226b267baf6622e67e3d4c83 Mon Sep 17 00:00:00 2001 From: mikey Date: Mon, 3 Jun 2013 21:33:32 +0000 Subject: fixing reserved symbol conflict with AS_02_USE (USE_AS_02) --- src/MXF.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/MXF.cpp') diff --git a/src/MXF.cpp b/src/MXF.cpp index 92b29d0..babbec7 100755 --- a/src/MXF.cpp +++ b/src/MXF.cpp @@ -985,7 +985,7 @@ ASDCP::MXF::OPAtomIndexFooter::InitFromFile(const Kumu::FileReader& Reader) // slurp up the remainder of the footer ui32_t read_count = 0; - if ( ASDCP_SUCCESS(result) ) + if ( ASDCP_SUCCESS(result) && IndexByteCount > 0 ) { assert (IndexByteCount <= 0xFFFFFFFFL); // At this point, m_FooterData may not have been initialized @@ -993,27 +993,27 @@ ASDCP::MXF::OPAtomIndexFooter::InitFromFile(const Kumu::FileReader& Reader) // However, if IndexByteCount is zero then the capacity // doesn't change and the data pointer is not set. result = m_FooterData.Capacity((ui32_t) IndexByteCount); - } - if ( ASDCP_SUCCESS(result) && m_FooterData.Data() ) - result = Reader.Read(m_FooterData.Data(), m_FooterData.Capacity(), &read_count); + if ( ASDCP_SUCCESS(result) ) + result = Reader.Read(m_FooterData.Data(), m_FooterData.Capacity(), &read_count); - if ( ASDCP_SUCCESS(result) && read_count != m_FooterData.Capacity() ) - { - DefaultLogSink().Error("Short read of footer partition: got %u, expecting %u\n", - read_count, m_FooterData.Capacity()); - return RESULT_FAIL; - } - else if( ASDCP_SUCCESS(result) && !m_FooterData.Data() ) - { - DefaultLogSink().Error( "Buffer for footer partition not created: IndexByteCount = %u\n", - IndexByteCount ); - return RESULT_FAIL; + if ( ASDCP_SUCCESS(result) && read_count != m_FooterData.Capacity() ) + { + DefaultLogSink().Error("Short read of footer partition: got %u, expecting %u\n", + read_count, m_FooterData.Capacity()); + return RESULT_FAIL; + } + else if( ASDCP_SUCCESS(result) && !m_FooterData.Data() ) + { + DefaultLogSink().Error( "Buffer for footer partition not created: IndexByteCount = %u\n", + IndexByteCount ); + return RESULT_FAIL; + } + + if ( ASDCP_SUCCESS(result) ) + result = InitFromBuffer(m_FooterData.RoData(), m_FooterData.Capacity()); } - if ( ASDCP_SUCCESS(result) ) - result = InitFromBuffer(m_FooterData.RoData(), m_FooterData.Capacity()); - return result; } -- cgit v1.2.3