summaryrefslogtreecommitdiff
path: root/src/MXF.cpp
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2017-05-25 00:16:56 +0000
committerjhurst <>2017-05-25 00:16:56 +0000
commit2f1e9f7d3b5cdd5319c31111daa7e56c6df43c0a (patch)
tree4c021012459611d1f2c9221e91b58149248b56d2 /src/MXF.cpp
parent753441a78ebe22dfd74616de953b415ce8f1d2fb (diff)
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
Diffstat (limited to 'src/MXF.cpp')
-rwxr-xr-xsrc/MXF.cpp9
1 files changed, 7 insertions, 2 deletions
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;
}