From b14d706a72c706c9c59dbdf64a9e41f32465e060 Mon Sep 17 00:00:00 2001 From: jhurst Date: Tue, 13 Apr 2021 15:50:50 -0700 Subject: 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. --- src/h__Reader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/h__Reader.cpp') diff --git a/src/h__Reader.cpp b/src/h__Reader.cpp index 77f532e..0e93257 100755 --- a/src/h__Reader.cpp +++ b/src/h__Reader.cpp @@ -64,7 +64,8 @@ ASDCP::default_md_object_init() // // -ASDCP::h__ASDCPReader::h__ASDCPReader(const Dictionary& d) : MXF::TrackFileReader(d), m_BodyPart(m_Dict) {} +ASDCP::h__ASDCPReader::h__ASDCPReader(const Dictionary *d) : + MXF::TrackFileReader(d), m_BodyPart(d) {} ASDCP::h__ASDCPReader::~h__ASDCPReader() {} -- cgit v1.2.3