release
authorjhurst <jhurst@cinecert.com>
Thu, 27 Oct 2011 22:07:13 +0000 (22:07 +0000)
committerjhurst <>
Thu, 27 Oct 2011 22:07:13 +0000 (22:07 +0000)
README
configure.ac
src/KLV.h
src/MXFTypes.cpp
src/h__Reader.cpp

diff --git a/README b/README
index e10a708b4c13a9c889f55ae49c1976384247b5e9..52bec40b433d77661076a237e0fb421ef6c514c9 100755 (executable)
--- a/README
+++ b/README
@@ -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
index fe6b078d15f29b1c9c4e5354f95fb41c09ad706b..1ab0e7cecf09693f3e05d0e9f26bed9897f8acf1 100644 (file)
@@ -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])
index 37f302de80aa81193d4c08f837d8cf2c99a1a975..37fdd2c0a0d00a08315b8457abfc436227f93b49 100755 (executable)
--- a/src/KLV.h
+++ b/src/KLV.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;
     };
 
index e2741d384d56b0c852809a826398cd237461fa82..1418541e89dbea1e94eab8054c8ae05d05e4ed6f 100755 (executable)
@@ -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
 {
index 6ba52e2678cf23b5b9b44577af127985fa4014f9..d466500b74f2d1d483871bb36b53e7909c704761 100755 (executable)
@@ -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 )
        {