diff options
| author | jhurst <jhurst@cinecert.com> | 2009-10-03 20:21:27 +0000 |
|---|---|---|
| committer | jhurst <> | 2009-10-03 20:21:27 +0000 |
| commit | b75bb9210f184d2a5261b824d2fc8b1ce23db641 (patch) | |
| tree | 8948e95263367be41c4f0fa2d8489dc38de5ecc8 /src | |
| parent | 85ce1b824ba6e07dda2a66f23c78d26edcb90c00 (diff) | |
decoder bug fixes
Diffstat (limited to 'src')
| -rwxr-xr-x | src/AS_DCP_JP2K.cpp | 4 | ||||
| -rwxr-xr-x | src/KM_util.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/AS_DCP_JP2K.cpp b/src/AS_DCP_JP2K.cpp index 009586a..9fcd2c4 100755 --- a/src/AS_DCP_JP2K.cpp +++ b/src/AS_DCP_JP2K.cpp @@ -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 ) { diff --git a/src/KM_util.h b/src/KM_util.h index 28bea68..9ba6dc5 100755 --- a/src/KM_util.h +++ b/src/KM_util.h @@ -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; } |
