From 2f1e9f7d3b5cdd5319c31111daa7e56c6df43c0a Mon Sep 17 00:00:00 2001 From: jhurst Date: Thu, 25 May 2017 00:16:56 +0000 Subject: o Added options -c -n, -q to as-02-wrap (IMF "color system") o Fixed a bug in the MXF reader that caused an assert when reading a partial (i.e.truncated) input file --- src/MXF.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/MXF.cpp') diff --git a/src/MXF.cpp b/src/MXF.cpp index 45b0298..cd7dfb1 100755 --- a/src/MXF.cpp +++ b/src/MXF.cpp @@ -713,7 +713,12 @@ ASDCP::MXF::OP1aHeader::InitFromFile(const Kumu::FileReader& Reader) } // slurp up the remainder of the header - if ( HeaderByteCount < 1024 ) + if ( HeaderByteCount == 0 ) + { + DefaultLogSink().Warn("MXF file contents incomplete.\n"); + return RESULT_KLV_CODING(__LINE__, __FILE__); + } + else if ( HeaderByteCount < 1024 ) { DefaultLogSink().Warn("Improbably small HeaderByteCount value: %qu\n", HeaderByteCount); } @@ -731,7 +736,7 @@ ASDCP::MXF::OP1aHeader::InitFromFile(const Kumu::FileReader& Reader) if ( ASDCP_FAILURE(result) ) { - DefaultLogSink().Error("OP1aHeader::InitFromFile, Read failed\n"); + DefaultLogSink().Error("OP1aHeader::InitFromFile, read failed.\n"); return result; } -- cgit v1.2.3