From: jhurst Date: Wed, 3 Oct 2018 18:15:32 +0000 (+0000) Subject: o Fixed bugs reported by Dolby: X-Git-Tag: rel_2_10_32~35 X-Git-Url: https://git.carlh.net/gitweb/?p=asdcplib.git;a=commitdiff_plain;h=2102a29cb047b761ead7cd7e5941e7ef393e4c29 o Fixed bugs reported by Dolby: bad assert test when writing GS partition unset frame count in ISXD unwrap bad UL when writing ISXF content packages --- diff --git a/src/AS_02_ISXD.cpp b/src/AS_02_ISXD.cpp index b9aaef5..55c937d 100644 --- a/src/AS_02_ISXD.cpp +++ b/src/AS_02_ISXD.cpp @@ -330,7 +330,7 @@ AS_02::ISXD::MXFWriter::h__Writer::SetSourceStream(const std::string& label, con return RESULT_STATE; } - memcpy(m_EssenceUL, m_Dict->ul(MDD_FrameWrappedISXDContainer), SMPTE_UL_LENGTH); + memcpy(m_EssenceUL, m_Dict->ul(MDD_FrameWrappedISXDData), SMPTE_UL_LENGTH); m_EssenceUL[SMPTE_UL_LENGTH-1] = 1; // first (and only) essence container Result_t result = m_State.Goto_READY(); diff --git a/src/as-02-unwrap.cpp b/src/as-02-unwrap.cpp index 623d2db..f0b3ba3 100755 --- a/src/as-02-unwrap.cpp +++ b/src/as-02-unwrap.cpp @@ -872,6 +872,7 @@ read_isxd_file(CommandOptions& Options) if ( ASDCP_SUCCESS(result) ) { result = FrameBuffer.Capacity(Options.fb_size); + frame_count = Reader.AS02IndexReader().GetDuration(); } if ( ASDCP_SUCCESS(result) ) diff --git a/src/h__Writer.cpp b/src/h__Writer.cpp index 97c6fc2..99d835a 100755 --- a/src/h__Writer.cpp +++ b/src/h__Writer.cpp @@ -193,7 +193,12 @@ ASDCP::AddDmsTrackGenericPartUtf8Text(Kumu::FileWriter& file_writer, MXF::OP1aHe } } - assert(max_sid>1); + if ( max_sid == 0 ) + { + DefaultLogSink().Error("Unable to add a GS Partition before the essence container has been established.\n"); + return RESULT_FORMAT; + } + rip.PairArray.push_back(RIP::PartitionPair(max_sid + 1, file_writer.Tell())); // Add new GSTBS linked to DMF