diff options
| author | jhurst <jhurst@cinecert.com> | 2011-10-27 22:07:13 +0000 |
|---|---|---|
| committer | jhurst <> | 2011-10-27 22:07:13 +0000 |
| commit | 289216de368bb6456b2f5e5dc6d4c38abac2b0d9 (patch) | |
| tree | b71a49a34001f894fb8607e4ec261bfa12962977 | |
| parent | d1be446a52726e2223f58b07e5bd2179c8742075 (diff) | |
release
| -rwxr-xr-x | README | 6 | ||||
| -rw-r--r-- | configure.ac | 2 | ||||
| -rwxr-xr-x | src/KLV.h | 1 | ||||
| -rwxr-xr-x | src/MXFTypes.cpp | 29 | ||||
| -rwxr-xr-x | src/h__Reader.cpp | 6 |
5 files changed, 38 insertions, 6 deletions
@@ -114,6 +114,10 @@ utilities all respond to -h. Change History +2011-10-27 - bug fixes v1.8.43 + o Corrected broken Essence UL matching. (Thanks to Michael Loder). + + 2011-08-31 - bug fixes v1.8.42 o Added missing HFR support for PCM essence reader/writer. @@ -133,7 +137,7 @@ Change History o Added missing Timestamp::Timestamp(const char* datestr) implementation. (Thanks to Matt Sheby for this and the previous three items.) o Fixed error in Kumu::FortunaRNG::FillRandom() that was returning the - end of the random buffer instead of the front (Mike Radford). + end of the random buffer instead of the front (Thanks to Mike Radford). o Added support for proposed sound channel format identifiers '7.1DS' and 'WTF'. Optimistically chose version '0x0c'. o Added support for stereoscopic images in JP2K files at edit diff --git a/configure.ac b/configure.ac index fe6b078..1ab0e7c 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,7 @@ AC_PREREQ([2.59]) # For example, if asdcplib version 1.0.0 were modified to accomodate changes # in file format, and if no changes were made to AS_DCP.h, the new version would be # 1.0.1. If changes were also required in AS_DCP.h, the new version would be 1.1.1. -AC_INIT([asdcplib], [1.8.42], [asdcplib@cinecert.com]) +AC_INIT([asdcplib], [1.8.43], [asdcplib@cinecert.com]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_SRCDIR([src/KM_error.h]) @@ -107,6 +107,7 @@ inline const char* ui64sz(ui64_t i, char* buf) const char* EncodeString(char* str_buf, ui32_t buf_len) const; bool operator==(const UL& rhs) const; + bool MatchIgnoreStream(const UL& rhs) const; bool ExactMatch(const UL& rhs) const; }; diff --git a/src/MXFTypes.cpp b/src/MXFTypes.cpp index e2741d3..1418541 100755 --- a/src/MXFTypes.cpp +++ b/src/MXFTypes.cpp @@ -38,6 +38,7 @@ using Kumu::DefaultLogSink; //------------------------------------------------------------------------------------------ // +// bool ASDCP::UL::operator==(const UL& rhs) const { @@ -48,7 +49,7 @@ ASDCP::UL::operator==(const UL& rhs) const m_Value[4] == rhs.m_Value[4] && m_Value[5] == rhs.m_Value[5] && m_Value[6] == rhs.m_Value[6] && - // m_Value[7] == rhs.m_Value[7] && version is ignored when performing lookups + // m_Value[7] == rhs.m_Value[7] && // version is ignored when performing lookups m_Value[8] == rhs.m_Value[8] && m_Value[9] == rhs.m_Value[9] && m_Value[10] == rhs.m_Value[10] && @@ -63,7 +64,33 @@ ASDCP::UL::operator==(const UL& rhs) const return false; } +// +bool +ASDCP::UL::MatchIgnoreStream(const UL& rhs) const +{ + if ( m_Value[0] == rhs.m_Value[0] && + m_Value[1] == rhs.m_Value[1] && + m_Value[2] == rhs.m_Value[2] && + m_Value[3] == rhs.m_Value[3] && + m_Value[4] == rhs.m_Value[4] && + m_Value[5] == rhs.m_Value[5] && + m_Value[6] == rhs.m_Value[6] && + // m_Value[7] == rhs.m_Value[7] && // version is ignored when performing lookups + m_Value[8] == rhs.m_Value[8] && + m_Value[9] == rhs.m_Value[9] && + m_Value[10] == rhs.m_Value[10] && + m_Value[11] == rhs.m_Value[11] && + m_Value[12] == rhs.m_Value[12] && + m_Value[13] == rhs.m_Value[13] && + m_Value[14] == rhs.m_Value[14] + // m_Value[15] == rhs.m_Value[15] // ignore stream number + ) + return true; + return false; +} + +// bool ASDCP::UL::ExactMatch(const UL& rhs) const { diff --git a/src/h__Reader.cpp b/src/h__Reader.cpp index 6ba52e2..d466500 100755 --- a/src/h__Reader.cpp +++ b/src/h__Reader.cpp @@ -250,7 +250,7 @@ ASDCP::h__Reader::ReadEKLVPacket(ui32_t FrameNum, ui32_t SequenceNum, ASDCP::Fra m_LastPosition = m_LastPosition + Reader.KLLength() + PacketLength; assert(m_Dict); - if ( memcmp(Key.Value(), m_Dict->ul(MDD_CryptEssence), Key.Size() - 1) == 0 ) // ignore the stream numbers + if ( Key.MatchIgnoreStream(m_Dict->ul(MDD_CryptEssence)) ) // ignore the stream numbers { if ( ! m_Info.EncryptedEssence ) { @@ -303,7 +303,7 @@ ASDCP::h__Reader::ReadEKLVPacket(ui32_t FrameNum, ui32_t SequenceNum, ASDCP::Fra return RESULT_FORMAT; // test essence UL - if ( memcmp(ess_p, EssenceUL, SMPTE_UL_LENGTH - 1) != 0 ) // ignore the stream number + if ( UL(ess_p).MatchIgnoreStream(EssenceUL) ) // ignore the stream number { char strbuf[IntBufferLen]; const MDDEntry* Entry = m_Dict->FindUL(Key.Value()); @@ -383,7 +383,7 @@ ASDCP::h__Reader::ReadEKLVPacket(ui32_t FrameNum, ui32_t SequenceNum, ASDCP::Fra FrameBuf.PlaintextOffset(PlaintextOffset); } } - else if ( memcmp(Key.Value(), EssenceUL, Key.Size() - 1) == 0 ) // ignore the stream number + else if ( Key.MatchIgnoreStream(EssenceUL) ) // ignore the stream number { // read plaintext frame if ( FrameBuf.Capacity() < PacketLength ) { |
