Fix Object ref not being written: this prevented GenericStreamTextBasedSet to be... 22/head
authorArnaud Bienner <abien@dolby.com>
Wed, 18 Dec 2019 13:37:41 +0000 (14:37 +0100)
committerArnaud Bienner <abien@dolby.com>
Wed, 18 Dec 2019 13:37:41 +0000 (14:37 +0100)
src/MXF.h
src/h__Writer.cpp

index b8d11939a4e0674a03b70474fa61b35f3801efed..d730b8cd81a6dcd2f840154c180fc7e79537b0b5 100755 (executable)
--- a/src/MXF.h
+++ b/src/MXF.h
@@ -253,7 +253,7 @@ namespace ASDCP
          }
          bool operator==(const PropertyType& rhs) const { return this->m_property == rhs; }
          bool operator==(const optional_property<PropertyType>& rhs) const { return this->m_property == rhs.m_property; }
-         operator PropertyType&() { return this->m_property; }
+         operator const PropertyType&() const { return this->m_property; }
          void set(const PropertyType& rhs) { this->m_property = rhs; this->m_has_value = true; }
          void set_has_value(bool has_value = true) { this->m_has_value = has_value; }
          void reset(const PropertyType& rhs) { this->m_has_value = false; }
index 71e9ce63bc268897cbd1fe1b712b2424738b77a5..fc7f06024a7a553bde3d72f362172f47a8a540b5 100755 (executable)
@@ -180,7 +180,8 @@ ASDCP::AddDmsTrackGenericPartUtf8Text(Kumu::FileWriter& file_writer, MXF::OP1aHe
   assert(dmf_obj);
   header_part.AddChildObject(dmf_obj);
   Segment->DMFramework = dmf_obj->InstanceUID;
-  GenRandomValue(dmf_obj->ObjectRef);
+  GenRandomValue(dmf_obj->ObjectRef.get());
+  dmf_obj->ObjectRef.set_has_value();
 
   // Create a new SID on the RIP, located at the current file position
   ui32_t max_sid = 0;