From b75bb9210f184d2a5261b824d2fc8b1ce23db641 Mon Sep 17 00:00:00 2001 From: jhurst Date: Sat, 3 Oct 2009 20:21:27 +0000 Subject: decoder bug fixes --- src/AS_DCP_JP2K.cpp | 4 ++-- src/KM_util.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3