summaryrefslogtreecommitdiff
path: root/src/MXF.cpp
diff options
context:
space:
mode:
authormikey <mikey@cinecert.com>2013-06-03 21:33:32 +0000
committermikey <>2013-06-03 21:33:32 +0000
commitde10f4a1f35fce05226b267baf6622e67e3d4c83 (patch)
treedb3f13e818eb19bb6ac41b04f842c398c6bb1b8a /src/MXF.cpp
parent25b162e106470d59bfbe57957c5855a6d1eb9260 (diff)
fixing reserved symbol conflict with AS_02_USE (USE_AS_02)
Diffstat (limited to 'src/MXF.cpp')
-rwxr-xr-xsrc/MXF.cpp36
1 files changed, 18 insertions, 18 deletions
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;
}