From 02576f10e9fbda710a7db35757950786a776a71d Mon Sep 17 00:00:00 2001 From: msheby Date: Sun, 1 Apr 2012 21:24:45 +0000 Subject: eliminate output filename warnings --- src/MXF.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/MXF.cpp') diff --git a/src/MXF.cpp b/src/MXF.cpp index 6bc3fcb..7f042ee 100755 --- a/src/MXF.cpp +++ b/src/MXF.cpp @@ -57,7 +57,10 @@ ASDCP::MXF::SeekToRIP(const Kumu::FileReader& Reader) if ( ASDCP_SUCCESS(result) && end_pos < (SMPTE_UL_LENGTH+MXF_BER_LENGTH) ) - result = RESULT_FAIL; // File is smaller than an empty packet! + { + DefaultLogSink().Error("File is smaller than an KLV empty packet.\n"); + result = RESULT_FAIL; + } if ( ASDCP_SUCCESS(result) ) result = Reader.Seek(end_pos - 4); @@ -72,7 +75,10 @@ ASDCP::MXF::SeekToRIP(const Kumu::FileReader& Reader) result = Reader.Read(intbuf, MXF_BER_LENGTH, &read_count); if ( ASDCP_SUCCESS(result) && read_count != 4 ) - result = RESULT_FAIL; + { + DefaultLogSink().Error("RIP contains fewer than four bytes.\n"); + result = RESULT_FAIL; + } } if ( ASDCP_SUCCESS(result) ) @@ -80,7 +86,10 @@ ASDCP::MXF::SeekToRIP(const Kumu::FileReader& Reader) rip_size = KM_i32_BE(Kumu::cp2i(intbuf)); if ( rip_size > end_pos ) // RIP can't be bigger than the file - return RESULT_FAIL; + { + DefaultLogSink().Error("RIP size impossibly large.\n"); + return RESULT_FAIL; + } } // reposition to start of RIP -- cgit v1.2.3