summaryrefslogtreecommitdiff
path: root/src/h__Writer.cpp
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2021-04-13 15:50:50 -0700
committerjhurst <jhurst@cinecert.com>2021-04-13 15:50:50 -0700
commitb14d706a72c706c9c59dbdf64a9e41f32465e060 (patch)
tree642c62a644544afb531a8fdbfd4e610bb72728ed /src/h__Writer.cpp
parent4e0891ab9ee94b822043126ea07e97641015e9b7 (diff)
o Added a Clone() method to InterchangeObject and derivatives
that allows making a descriptor copy that is not owned by any other strucure. The caller must arrange to delete the object pointer returned. o While implementing the above it became obvious that the reference-to-a-pointer-to-the-dictionary idiom that is used throughout the lower levels of the MXF library was the cause of much more grief than it was originally designed to prevent. This was made even more obvious when I replaced all of it with simple pointers, which revealed several shadow instances of m_Dict that were only reliable while the object that held them was valid.
Diffstat (limited to 'src/h__Writer.cpp')
-rwxr-xr-xsrc/h__Writer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/h__Writer.cpp b/src/h__Writer.cpp
index 0c56b4c..f6d49b6 100755
--- a/src/h__Writer.cpp
+++ b/src/h__Writer.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2004-2018, John Hurst
+Copyright (c) 2004-2021, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -46,7 +46,7 @@ ASDCP::derive_timecode_rate_from_edit_rate(const ASDCP::Rational& edit_rate)
// add DMS CryptographicFramework entry to source package
void
ASDCP::AddDmsCrypt(Partition& HeaderPart, SourcePackage& Package,
- WriterInfo& Descr, const UL& WrappingUL, const Dictionary*& Dict)
+ WriterInfo& Descr, const UL& WrappingUL, const Dictionary* Dict)
{
assert(Dict);
// Essence Track
@@ -102,7 +102,7 @@ id_batch_contains(const Array<Kumu::UUID>& batch, const Kumu::UUID& value)
//
Result_t
ASDCP::AddDmsTrackGenericPartUtf8Text(Kumu::FileWriter& file_writer, MXF::OP1aHeader& header_part,
- SourcePackage& source_package, MXF::RIP& rip, const Dictionary*& Dict)
+ SourcePackage& source_package, MXF::RIP& rip, const Dictionary* Dict)
{
Sequence* Sequence_obj = 0;
InterchangeObject* tmp_iobj = 0;
@@ -213,8 +213,8 @@ ASDCP::AddDmsTrackGenericPartUtf8Text(Kumu::FileWriter& file_writer, MXF::OP1aHe
}
//
-ASDCP::h__ASDCPWriter::h__ASDCPWriter(const Dictionary& d) :
- MXF::TrackFileWriter<OP1aHeader>(d), m_BodyPart(m_Dict), m_FooterPart(m_Dict) {}
+ASDCP::h__ASDCPWriter::h__ASDCPWriter(const Dictionary* d) :
+ MXF::TrackFileWriter<OP1aHeader>(d), m_BodyPart(d), m_FooterPart(d) {}
ASDCP::h__ASDCPWriter::~h__ASDCPWriter() {}