X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fh__02_Reader.cpp;h=b3c092b39ede5b625a55a6ef94b50ca1c180b50a;hb=250b2032101b132a29e935173034cc4393f76978;hp=9e07f72c75adf6fee2f9010563a68fd33aa19881;hpb=976a32de62b29ed688abecdebd6cb57f3ed299e7;p=asdcplib.git diff --git a/src/h__02_Reader.cpp b/src/h__02_Reader.cpp index 9e07f72..b3c092b 100644 --- a/src/h__02_Reader.cpp +++ b/src/h__02_Reader.cpp @@ -1,5 +1,5 @@ /* -Copyright (c) 2011-2016, Robert Scheler, Heiko Sparenberg Fraunhofer IIS, +Copyright (c) 2011-2018, Robert Scheler, Heiko Sparenberg Fraunhofer IIS, John Hurst All rights reserved. @@ -93,7 +93,7 @@ AS_02::MXF::AS02IndexReader::InitFromFile(const Kumu::FileReader& reader, const } else if ( i->BodySID != first_body_sid ) { - DefaultLogSink().Debug("The index assembler is ignoring BodySID %d.\n", i->BodySID); + // DefaultLogSink().Debug("The index assembler is ignoring BodySID %d.\n", i->BodySID); continue; } @@ -399,7 +399,7 @@ AS_02::h__AS02Reader::~h__AS02Reader() {} // AS-DCP method of opening an MXF file for read Result_t -AS_02::h__AS02Reader::OpenMXFRead(const char* filename) +AS_02::h__AS02Reader::OpenMXFRead(const std::string& filename) { bool has_header_essence = false; Result_t result = ASDCP::MXF::TrackFileReader::OpenMXFRead(filename); @@ -411,7 +411,6 @@ AS_02::h__AS02Reader::OpenMXFRead(const char* filename) { // UL OP1a_ul(m_Dict->ul(MDD_OP1a)); - InterchangeObject* Object; m_Info.LabelSetType = LS_MXF_SMPTE; if ( m_HeaderPart.OperationalPattern != OP1a_ul ) @@ -431,10 +430,13 @@ AS_02::h__AS02Reader::OpenMXFRead(const char* filename) } // - if ( m_RIP.PairArray.front().ByteOffset != 0 ) + if ( ! m_RIP.PairArray.empty() ) { - DefaultLogSink().Error("First Partition in RIP is not at offset 0.\n"); - return RESULT_AS02_FORMAT; + if ( m_RIP.PairArray.front().ByteOffset != 0 ) + { + DefaultLogSink().Error("First Partition in RIP is not at offset 0.\n"); + return RESULT_AS02_FORMAT; + } } Kumu::fpos_t first_partition_after_header = 0;