decoder bug fixes
authorjhurst <jhurst@cinecert.com>
Sat, 3 Oct 2009 20:21:27 +0000 (20:21 +0000)
committerjhurst <>
Sat, 3 Oct 2009 20:21:27 +0000 (20:21 +0000)
src/AS_DCP_JP2K.cpp
src/KM_util.h

index 009586a0370e0efef37b8078d0b566c9aa95fd85..9fcd2c4d78cb9b8bb8b53184e186cd3e50b44feb 100755 (executable)
@@ -312,8 +312,8 @@ lh__Reader::OpenRead(const char* filename, EssenceType_t type)
        {
          if ( m_EditRate != m_SampleRate )
            {
-             DefaultLogSink().Error("EditRate and SampleRate do not match (%.03f, %.03f).\n",
-                                    m_EditRate.Quotient(), m_SampleRate.Quotient());
+             DefaultLogSink().Warn("EditRate and SampleRate do not match (%.03f, %.03f).\n",
+                                   m_EditRate.Quotient(), m_SampleRate.Quotient());
              
              if ( m_EditRate == EditRate_24 && m_SampleRate == EditRate_48 )
                {
index 28bea68470c99b92653d627183b6c5ac2540ee81..9ba6dc54c9f7083056ce0c18af1f7f70e3fb687c 100755 (executable)
@@ -283,6 +283,8 @@ namespace Kumu
       inline bool DecodeHex(const char* str) {
        ui32_t char_count;
        m_HasValue = ( hex2bin(str, m_Value, SIZE, &char_count) == 0 );
+       if ( m_HasValue && char_count != SIZE )
+         m_HasValue = false;
        return m_HasValue;
       }
 
@@ -297,6 +299,8 @@ namespace Kumu
       inline bool DecodeBase64(const char* str) {
        ui32_t char_count;
        m_HasValue = ( base64decode(str, m_Value, SIZE, &char_count) == 0 );
+       if ( m_HasValue && char_count != SIZE )
+         m_HasValue = false;
        return m_HasValue;
       }