diff options
| author | jhurst <jhurst@cinecert.com> | 2021-04-13 15:50:50 -0700 |
|---|---|---|
| committer | jhurst <jhurst@cinecert.com> | 2021-04-13 15:50:50 -0700 |
| commit | b14d706a72c706c9c59dbdf64a9e41f32465e060 (patch) | |
| tree | 642c62a644544afb531a8fdbfd4e610bb72728ed /src/AS_02_ACES.cpp | |
| parent | 4e0891ab9ee94b822043126ea07e97641015e9b7 (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/AS_02_ACES.cpp')
| -rw-r--r-- | src/AS_02_ACES.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/AS_02_ACES.cpp b/src/AS_02_ACES.cpp index c8eeca3..0d3105a 100644 --- a/src/AS_02_ACES.cpp +++ b/src/AS_02_ACES.cpp @@ -1,5 +1,5 @@ /* -Copyright (c) 2018, Bjoern Stresing, Patrick Bichiou, Wolfgang Ruppel, +Copyright (c) 2018-2021, Bjoern Stresing, Patrick Bichiou, Wolfgang Ruppel, John Hurst All rights reserved. @@ -290,7 +290,7 @@ class AS_02::ACES::MXFReader::h__Reader : public AS_02::h__AS02Reader ASDCP::MXF::RGBAEssenceDescriptor *m_EssenceDescriptor; public: - h__Reader(const Dictionary& d) : + h__Reader(const Dictionary *d) : AS_02::h__AS02Reader(d), m_EssenceDescriptor(NULL) {} AS_02::ACES::ResourceList_t m_Anc_Resources; @@ -501,7 +501,7 @@ public: byte_t m_EssenceUL[SMPTE_UL_LENGTH]; ui32_t m_EssenceStreamID; - h__Writer(const Dictionary& d) : h__AS02WriterFrame(d), m_EssenceStreamID(10) + h__Writer(const Dictionary *d) : h__AS02WriterFrame(d), m_EssenceStreamID(10) { memset(m_EssenceUL, 0, SMPTE_UL_LENGTH); @@ -747,7 +747,7 @@ AS_02::Result_t AS_02::ACES::MXFWriter::OpenWrite(const std::string &filename, c return RESULT_PARAM; } - m_Writer = new AS_02::ACES::MXFWriter::h__Writer(DefaultSMPTEDict()); + m_Writer = new AS_02::ACES::MXFWriter::h__Writer(&DefaultSMPTEDict()); m_Writer->m_Info = Info; Result_t result = m_Writer->OpenWrite(filename, essence_descriptor, essence_sub_descriptor_list, strategy, partition_space, header_size); @@ -785,7 +785,7 @@ AS_02::Result_t AS_02::ACES::MXFWriter::WriteAncillaryResource(const AS_02::ACES AS_02::ACES::MXFReader::MXFReader() { - m_Reader = new h__Reader(DefaultCompositeDict()); + m_Reader = new h__Reader(&DefaultCompositeDict()); } AS_02::ACES::MXFReader::~MXFReader() |
