diff options
| author | John Hurst <jhurst@cinecert.com> | 2023-07-31 08:00:50 -0700 |
|---|---|---|
| committer | John Hurst <jhurst@cinecert.com> | 2023-07-31 08:00:50 -0700 |
| commit | 31e6bb2b3dfc330ae9ca35add278836cdc6ad19a (patch) | |
| tree | a6d915a1bd217548020bcdbbb9080f848ae06a8c /src | |
| parent | 017b179b97e034981f803591070b886f3a9e70bb (diff) | |
fix: allow full 64 bits of index duration through API
Diffstat (limited to 'src')
| -rw-r--r-- | src/AS_02.h | 4 | ||||
| -rw-r--r-- | src/as-02-info.cpp | 8 | ||||
| -rw-r--r-- | src/h__02_Reader.cpp | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/AS_02.h b/src/AS_02.h index 8a31d8f..516d470 100644 --- a/src/AS_02.h +++ b/src/AS_02.h @@ -73,7 +73,7 @@ namespace AS_02 class AS02IndexReader : public ASDCP::MXF::Partition { Kumu::ByteString m_IndexSegmentData; - ui32_t m_Duration; + ui64_t m_Duration; ui32_t m_BytesPerEditUnit; Result_t InitFromBuffer(const byte_t* p, ui32_t l, const ui64_t& body_offset, const ui64_t& essence_container_offset); @@ -88,7 +88,7 @@ namespace AS_02 virtual ~AS02IndexReader(); Result_t InitFromFile(const Kumu::IFileReader& reader, const ASDCP::MXF::RIP& rip, const bool has_header_essence); - ui32_t GetDuration() const; + ui64_t GetDuration() const; void Dump(FILE* = 0); Result_t GetMDObjectByID(const Kumu::UUID&, ASDCP::MXF::InterchangeObject** = 0); Result_t GetMDObjectByType(const byte_t*, ASDCP::MXF::InterchangeObject** = 0); diff --git a/src/as-02-info.cpp b/src/as-02-info.cpp index a1235ac..275111c 100644 --- a/src/as-02-info.cpp +++ b/src/as-02-info.cpp @@ -786,12 +786,12 @@ public: { m_Desc.FillDescriptor(m_Reader); m_Reader.FillWriterInfo(m_WriterInfo); - - fprintf(stdout, "%s file essence type is %s, (%d edit unit%s).\n", + ui64_t container_duration = m_Desc.ContainerDuration; + fprintf(stdout, "%s file essence type is %s, (%llu edit unit%s).\n", ( m_WriterInfo.LabelSetType == LS_MXF_SMPTE ? "SMPTE 2067-5" : "Unknown" ), type_string, - m_Desc.ContainerDuration, - (m_Desc.ContainerDuration == (ui64_t)1 ? "":"s")); + container_duration, + (container_duration == ui64_C(1) ? "":"s")); if ( Options.showheader_flag ) { diff --git a/src/h__02_Reader.cpp b/src/h__02_Reader.cpp index 17c5871..a876f35 100644 --- a/src/h__02_Reader.cpp +++ b/src/h__02_Reader.cpp @@ -336,7 +336,7 @@ AS_02::MXF::AS02IndexReader::GetMDObjectsByType(const byte_t* ObjectID, std::lis // -ui32_t +ui64_t AS_02::MXF::AS02IndexReader::GetDuration() const { return m_Duration; |
