summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2007-03-31 18:48:57 +0000
committerjhurst <>2007-03-31 18:48:57 +0000
commitb072ecf1205c9b00eb8cd8b9370917d52a99927d (patch)
treefa8c5297d97438ec5e6155969450e20b4604810b /src
parentf6c05bf6bbe2efc6529bd4ba0b8c1907653d728d (diff)
bugfixes for release
Diffstat (limited to 'src')
-rwxr-xr-xsrc/KM_util.h8
-rwxr-xr-xsrc/MXF.cpp13
-rwxr-xr-xsrc/asdcp-mem-test.cpp10
-rwxr-xr-xsrc/j2c-test.cpp7
4 files changed, 20 insertions, 18 deletions
diff --git a/src/KM_util.h b/src/KM_util.h
index 5ca3baa..244fc45 100755
--- a/src/KM_util.h
+++ b/src/KM_util.h
@@ -446,9 +446,11 @@ namespace Kumu
inline virtual bool Unarchive(MemIOReader* Reader) {
assert(Reader);
- if ( ! Reader->ReadUi32BE(&m_Length) ) return false;
- if ( KM_FAILURE(Capacity(m_Length)) ) return false;
- if ( ! Reader->ReadRaw(m_Data, m_Length) ) return false;
+ ui32_t tmp_len;
+ if ( ! Reader->ReadUi32BE(&tmp_len) ) return false;
+ if ( KM_FAILURE(Capacity(tmp_len)) ) return false;
+ if ( ! Reader->ReadRaw(m_Data, tmp_len) ) return false;
+ m_Length = tmp_len;
return true;
}
};
diff --git a/src/MXF.cpp b/src/MXF.cpp
index 168ee52..fb32e8a 100755
--- a/src/MXF.cpp
+++ b/src/MXF.cpp
@@ -709,14 +709,15 @@ ASDCP::MXF::OPAtomHeader::InitFromFile(const Kumu::FileReader& Reader)
delete object;
result = m_Primer.InitFromBuffer(redo_p, end_p - redo_p);
}
- else if ( object->IsA(Dict::ul(MDD_Preface)) )
- {
- assert(m_Preface == 0);
- m_Preface = (Preface*)object;
- }
- else
+ else
{
m_PacketList->AddPacket(object);
+
+ if ( object->IsA(Dict::ul(MDD_Preface)) )
+ {
+ assert(m_Preface == 0);
+ m_Preface = (Preface*)object;
+ }
}
}
else
diff --git a/src/asdcp-mem-test.cpp b/src/asdcp-mem-test.cpp
index b199abe..4b44ad6 100755
--- a/src/asdcp-mem-test.cpp
+++ b/src/asdcp-mem-test.cpp
@@ -31,12 +31,14 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <AS_DCP_internal.h>
-#include <FortunaRNG.h>
+//#include <KM_platform.h>
+#include <KM_prng.h>
#include <iostream>
#include <assert.h>
using namespace ASDCP;
+using namespace Kumu;
const ui32_t buf_size = 1024;
FortunaRNG RNG;
@@ -101,11 +103,6 @@ int c()
//
int d()
{
- mem_ptr<DataChunk> Chunk(new DataChunk(1024));
-
-
-#if 0
-
// MPEG2::Parser mPFile;
MPEG2::MXFReader mRFile;
Result_t result = mRFile.OpenRead("../test/write_test_mpeg.mxf");
@@ -120,7 +117,6 @@ int d()
PCM::WAVParser pPFile;
PCM::MXFReader pRFile;
PCM::MXFWriter pWFile;
-#endif
return 0;
}
diff --git a/src/j2c-test.cpp b/src/j2c-test.cpp
index cfced0c..5736150 100755
--- a/src/j2c-test.cpp
+++ b/src/j2c-test.cpp
@@ -30,8 +30,11 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <AS_DCP.h>
-#include <FileIO.h>
+#include <KM_fileio.h>
+#include <KM_util.h>
#include <JP2K.h>
+
+using namespace Kumu;
using namespace ASDCP;
using namespace ASDCP::JP2K;
@@ -56,7 +59,7 @@ main(int argc, const char** argv)
if ( result != RESULT_FAIL )
{
- fputs(GetResultString(result), stderr);
+ fputs(result.Label(), stderr);
fputc('\n', stderr);
}