From 72e5392ca11c06a1ac0732c71f86df0d9a712ce3 Mon Sep 17 00:00:00 2001 From: jhurst Date: Sat, 23 Sep 2006 23:47:17 +0000 Subject: [PATCH] 1.1.9 release a --- README | 71 ++++++++++++----- src/AS_DCP.h | 4 +- src/JP2K_Codestream_Parser.cpp | 6 ++ src/KLV.h | 2 + src/KM_fileio.cpp | 5 +- src/KM_fileio.h | 2 +- src/KM_memio.h | 22 +++++- src/KM_prng.cpp | 33 ++------ src/KM_util.h | 138 ++++++++++++++++++++------------- src/MPEG2_Parser.cpp | 1 + src/MXFTypes.h | 3 +- src/PCMParserList.h | 5 +- src/h__Writer.cpp | 6 +- src/kmfilegen.cpp | 20 ++--- src/wavesplit.cpp | 2 +- 15 files changed, 196 insertions(+), 124 deletions(-) diff --git a/README b/README index 3d91c88..247a8ce 100755 --- a/README +++ b/README @@ -3,12 +3,12 @@ $Id$ The asdcplib library is a set of objects that offer simplified access to files conforming to the sound and -picture track file formats proposed by the SMPTE working -group DC-28.20. +picture track file formats developed by the SMPTE Working +Group DC28.20. This work was originally funded by Digital Cinema Initiatives, LLC (DCI). Subsequent efforts have been funded -by Deluxe Laboratories, Doremi Labs, CineCert, LLC, Avica +by Deluxe Laboratories, Doremi Labs, CineCert LLC, Avica Technology and others. **The asdcplib project was housed on SourceForge. The project @@ -22,7 +22,7 @@ a dedicated MXF implementation that is now part of this library. Special thanks to Matt Beard and Oliver Morgan for their great work and support. -Thanks also to the members of the SMPTE DC-28.20 packaging +Thanks also to the members of the SMPTE DC28.20 packaging ad-hoc group and the members of the MXF Interop Initiative for their encouragement and support. Special thanks to Jim Whittlesey and Howard Lukk at DCI for proposing and @@ -69,27 +69,33 @@ the dep.make file. OpenSSL is also required. See http://www.openssl.org If you are building on win32 or a unix with no OpenSSL library -support, you will have to also obtain and build OpenSSL (I'm -using 0.9.7d on win32). Unpack it into the same parent directory -as asdcplib/, and rename the directory as (or make a sym link -named) 'openssl': +support, you will have to also obtain and build OpenSSL. Unpack +it into the same parent directory as asdcplib/, and rename the +directory as 'openssl': myhost$ ls -l total 1761 drwxr-xr-x 1 jhurst None 0 Feb 3 16:37 asdcplib drwxr-xr-x 56 jhurst None 0 Feb 2 16:35 openssl -I have tested this build on win32, Linux and Darwin platforms. -Others may work as well. +To build, type 'make'. There are several test targets but you +need to assemble a set of test files to use them. + +I have tested this build on win32, Linux, OpenBSD and Darwin +platforms. Others may work as well. + + Utilities asdcp-test - Writes, reads and verifies AS-DCP (MXF) track files. -asdcp-lf-test - Writes and verifies large files using a platform- +kmfilegen - Writes and verifies large files using a platform- independent format. Use it to test issues related to large files. +kmuuidgen, kmrandgen - generate UUID values and random numbers + wavesplit - Splits a WAVE file into two or more output files. Used to untangle incorrectly-paired DCDM sound files. @@ -100,14 +106,41 @@ blackwave - Write a WAVE file full of zeros, Used to make filler Documentation -Currently, the documentation is mostly in AS_DCP.h. Read -that file for a detailed description of the library's -capabilities. Read asdcp-test.cpp for library usage -examples. More detailed documentation will be written RSN. +Currently, the API documentation is mostly in AS_DCP.h. Read +that file for a detailed description of the library's capabilities. +Read asdcp-test.cpp for library usage examples. The command-line +utilities all respond to -h and there are manual pages in man/. Change History -2006.04.05 - Bug fixes and new stuff +2006.09.25 - Bug fixes v1.1.9 + o Fixed SourcePackageID value. All files will be 'original', + i.e. SourcePackageID will be all zeros. Let me know if you + want to set SourcePackageID. + o Fixed compiler warnings on some Linux platforms + o Fixed the build so that BUILD_DIR is no longer created + as a dependency. + o Added duration detection to the raw essence parsers. The + MPEG parser uses a nasty approximation so don't use it + without paying close attention to the result. + o Modified PCMParserList to make it more useful as a base + class. + o Fixed bugs and re-organized command-line help in asdcp-test + and klvwalk. + o Fixed two-partition file reads. + o Fixed Win32 PRNG initialization. + o Renamed asdcp-lf-test as kmfilegen. + o Added kmrandgen and kmuuidgen. + o Added string retrieval mechanism to Result_t. + o Refactored Kumu::Identifier and its sub-classes. + o Altered Kumu::PathIsFile to return true when the path + is a symbolic link (unix only). + o Altered Kumu::FileWriter::OpenWrite to use file creation + mode 0664 (was 0644) (unix only). + o Added Kumu::WriteStringIntoFile() subroutine. + + +2006.04.05 - Bug fixes and new stuff v1.1.7 o Fixed a bug in the MPEG parser that caused it to fail when handling start codes spanning buffer boundaries o Added wavesplit and blackwave utility programs @@ -124,12 +157,12 @@ Change History const Kumu::Result_t RESULT_FORMAT (-101, "The file..."); The macros ASDCP_SUCCESS and ASDCP_FAILURE still work - the same thanks to an operator overload for long. See - KM_error.h for more information. + the same way thanks to an operator overload for type long. + See KM_error.h for more information. + The logging interface has been moved out of AS_DCP.h and into KM_log.h o Some of the command line utilities that were using headers - other than AS_DCP.h have been changed to us the Kumu + other than AS_DCP.h have been changed to use the Kumu equivalents. If you have code based on those utilities, you will have to update by hand. o Added new types to the EssenceType_t enum. diff --git a/src/AS_DCP.h b/src/AS_DCP.h index deccbbb..5dafdaa 100755 --- a/src/AS_DCP.h +++ b/src/AS_DCP.h @@ -143,7 +143,7 @@ namespace ASDCP { // 1.0.1. If changes were also required in AS_DCP.h, the new version would be 1.1.1. const ui32_t VERSION_MAJOR = 1; const ui32_t VERSION_APIMINOR = 1; - const ui32_t VERSION_IMPMINOR = 8; + const ui32_t VERSION_IMPMINOR = 9; const char* Version(); // UUIDs are passed around as strings of UUIDlen bytes @@ -201,8 +201,6 @@ namespace ASDCP { ESS_JPEG_2000, // the file contains one or more JPEG 2000 codestreams ESS_PCM_24b_48k, // the file contains one or more PCM audio pairs ESS_PCM_24b_96k, // the file contains one or more PCM audio pairs - ESS_UTF8_XML, // the file contains UTF-8 encoded XML data - ESS_PNG // the file contains a Portable Network Graphics image }; // Determine the type of essence contained in the given MXF file. RESULT_OK diff --git a/src/JP2K_Codestream_Parser.cpp b/src/JP2K_Codestream_Parser.cpp index 4211653..32a5316 100755 --- a/src/JP2K_Codestream_Parser.cpp +++ b/src/JP2K_Codestream_Parser.cpp @@ -90,6 +90,12 @@ public: while ( p < end_p && ASDCP_SUCCESS(result) ) { result = GetNextMarker(&p, NextMarker); + + if ( ASDCP_FAILURE(result) ) + { + result = RESULT_RAW_ESS; + break; + } #if 0 fprintf(stderr, "%s Length: %u\n", GetMarkerString(NextMarker.m_Type), NextMarker.m_DataSize); diff --git a/src/KLV.h b/src/KLV.h index 4271999..d685cf9 100755 --- a/src/KLV.h +++ b/src/KLV.h @@ -119,6 +119,8 @@ inline const char* ui64sz(ui64_t i, char* buf) const char* EncodeString(char* str_buf, ui32_t buf_len) const; }; + const byte_t nil_UMID[SMPTE_UMID_LENGTH] = {0}; + const UMID NilUMID(nil_UMID); // struct MDDEntry diff --git a/src/KM_fileio.cpp b/src/KM_fileio.cpp index a41669f..ef1c9dc 100644 --- a/src/KM_fileio.cpp +++ b/src/KM_fileio.cpp @@ -629,7 +629,10 @@ Kumu::ReadFileIntoString(const char* filename, std::string& outString, ui32_t ma fsize = File.Size(); if ( fsize > (Kumu::fpos_t)max_size ) - return RESULT_ALLOC; + { + DefaultLogSink().Error("%s: exceeds available buffer size (%u)", filename, max_size); + return RESULT_ALLOC; + } result = ReadBuf.Capacity((ui32_t)fsize); } diff --git a/src/KM_fileio.h b/src/KM_fileio.h index b268ad7..96cdf00 100755 --- a/src/KM_fileio.h +++ b/src/KM_fileio.h @@ -114,7 +114,7 @@ namespace Kumu fsize_t FileSize(const char* pathname); // Reads an entire file into a string. - Result_t ReadFileIntoString(const char* filename, std::string& outString, ui32_t max_size = 256 * Kilobyte); + Result_t ReadFileIntoString(const char* filename, std::string& outString, ui32_t max_size = 8 * Megabyte); // Writes a string to a file, overwrites the existing file if present. Result_t WriteStringIntoFile(const char* filename, const std::string& inString); diff --git a/src/KM_memio.h b/src/KM_memio.h index 8416b57..483bbde 100755 --- a/src/KM_memio.h +++ b/src/KM_memio.h @@ -33,7 +33,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define _KM_MEMIO_H_ #include -#include +#include namespace Kumu { @@ -207,6 +207,26 @@ namespace Kumu } }; + // + inline bool + UnarchiveString(MemIOReader& Reader, std::string& str) + { + ui32_t str_length; + if ( ! Reader.ReadUi32BE(&str_length) ) return false; + str.assign((const char*)Reader.CurrentData(), str_length); + if ( ! Reader.SkipOffset(str_length) ) return false; + return true; + } + + // + inline bool + ArchiveString(MemIOWriter& Writer, const std::string& str) + { + if ( ! Writer.WriteUi32BE(str.length()) ) return false; + if ( ! Writer.WriteRaw((const byte_t*)str.c_str(), str.length()) ) return false; + return true; + } + } // namespace Kumu #endif // _KM_MEMIO_H_ diff --git a/src/KM_prng.cpp b/src/KM_prng.cpp index 01d4b1d..094ee1b 100755 --- a/src/KM_prng.cpp +++ b/src/KM_prng.cpp @@ -41,31 +41,10 @@ using namespace Kumu; #ifdef KM_WIN32 - -// make up a byte by sampling the perf counter LSB -static byte_t get_perf_byte(byte_t carry) -{ - LARGE_INTEGER ticks; - byte_t sha_buf[20]; - SHA_CTX SHA; - SHA1_Init(&SHA); - SHA1_Update(&SHA, &carry, sizeof(byte_t)); - - for ( int i = 0; i < 128; i++ ) - { - QueryPerformanceCounter(&ticks); - SHA1_Update(&SHA, &ticks.LowPart, sizeof(ticks.LowPart)); - } - - SHA1_Final(sha_buf, &SHA); - return sha_buf[0]; -} - +# include #else // KM_WIN32 - -#include +# include const char* DEV_URANDOM = "/dev/urandom"; - #endif // KM_WIN32 @@ -95,11 +74,9 @@ public: AutoMutex Lock(m_Lock); #ifdef KM_WIN32 - for ( ui32_t i = 0; i < RNG_KEY_SIZE; i++ ) - { - byte_t carry = ( i == 0 ) ? 0xa3 : rng_key[i-1]; - rng_key[i] = get_perf_byte(carry); - } + HCRYPTPROV hProvider = 0; + CryptAcquireContext(&hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); + CryptGenRandom(hProvider, RNG_KEY_SIZE, rng_key); #else // KM_WIN32 // on POSIX systems we simply read some seed from /dev/urandom FileReader URandom; diff --git a/src/KM_util.h b/src/KM_util.h index 9d975b9..d210bb9 100755 --- a/src/KM_util.h +++ b/src/KM_util.h @@ -40,18 +40,29 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace Kumu { + // a class that represents the string form of a value template class IntPrinter : public std::string { - protected: + KM_NO_COPY_CONSTRUCT(IntPrinter); IntPrinter(); + + protected: + const char* m_format; char m_strbuf[SIZE]; public: - inline const char* c_str() { return m_strbuf; } - IntPrinter(const char* format, T value) { - snprintf(m_strbuf, SIZE, format, value); + assert(format); + m_format = format; + snprintf(m_strbuf, SIZE, m_format, value); + } + + inline operator const char*() { return m_strbuf; } + inline const char* c_str() { return m_strbuf; } + inline const char* set_value(T value) { + snprintf(m_strbuf, SIZE, m_format, value); + return m_strbuf; } }; @@ -152,6 +163,8 @@ namespace Kumu //---------------------------------------------------------------- // + // an abstract base class that objects implement to serialize state + // to and from a binary stream. class IArchive { public: @@ -163,7 +176,9 @@ namespace Kumu // - // the base of all identifier classes + // the base of all identifier classes, Identifier is not usually used directly + // see UUID and SymmetricKey below for more detail. + // template class Identifier : public IArchive { @@ -191,57 +206,51 @@ namespace Kumu inline const byte_t* Value() const { return m_Value; } inline ui32_t Size() const { return SIZE; } - inline bool operator<(const Identifier& rhs) const - { - ui32_t test_size = xmin(rhs.Size(), SIZE); - for ( ui32_t i = 0; i < test_size; i++ ) - { - if ( m_Value[i] != rhs.m_Value[i] ) - return m_Value[i] < rhs.m_Value[i]; - } - - return false; - } - - inline bool operator==(const Identifier& rhs) const - { - if ( rhs.Size() != SIZE ) return false; - return ( memcmp(m_Value, rhs.m_Value, SIZE) == 0 ); - } - - inline bool operator!=(const Identifier& rhs) const - { - if ( rhs.Size() != SIZE ) return true; - return ( memcmp(m_Value, rhs.m_Value, SIZE) != 0 ); - } - - inline bool DecodeHex(const char* str) - { - ui32_t char_count; - m_HasValue = ( hex2bin(str, m_Value, SIZE, &char_count) == 0 ); - return m_HasValue; - } - - inline const char* EncodeHex(char* buf, ui32_t buf_len) const - { - return bin2hex(m_Value, SIZE, buf, buf_len); - } + inline bool operator<(const Identifier& rhs) const { + ui32_t test_size = xmin(rhs.Size(), SIZE); + + for ( ui32_t i = 0; i < test_size; i++ ) + { + if ( m_Value[i] != rhs.m_Value[i] ) + return m_Value[i] < rhs.m_Value[i]; + } + + return false; + } + + inline bool operator==(const Identifier& rhs) const { + if ( rhs.Size() != SIZE ) return false; + return ( memcmp(m_Value, rhs.m_Value, SIZE) == 0 ); + } + + inline bool operator!=(const Identifier& rhs) const { + if ( rhs.Size() != SIZE ) return true; + return ( memcmp(m_Value, rhs.m_Value, SIZE) != 0 ); + } + + inline bool DecodeHex(const char* str) { + ui32_t char_count; + m_HasValue = ( hex2bin(str, m_Value, SIZE, &char_count) == 0 ); + return m_HasValue; + } + + inline const char* EncodeHex(char* buf, ui32_t buf_len) const { + return bin2hex(m_Value, SIZE, buf, buf_len); + } inline const char* EncodeString(char* str_buf, ui32_t buf_len) const { return EncodeHex(str_buf, buf_len); } - inline bool DecodeBase64(const char* str) - { - ui32_t char_count; - m_HasValue = ( base64decode(str, m_Value, SIZE, &char_count) == 0 ); - return m_HasValue; - } + inline bool DecodeBase64(const char* str) { + ui32_t char_count; + m_HasValue = ( base64decode(str, m_Value, SIZE, &char_count) == 0 ); + return m_HasValue; + } - inline const char* EncodeBase64(char* buf, ui32_t buf_len) const - { - return base64encode(m_Value, SIZE, buf, buf_len); - } + inline const char* EncodeBase64(char* buf, ui32_t buf_len) const { + return base64encode(m_Value, SIZE, buf, buf_len); + } inline bool HasValue() const { return m_HasValue; } @@ -326,19 +335,23 @@ namespace Kumu // decode and set value from string formatted by EncodeString bool DecodeString(const char* datestr); - // add the given number of days or hours to the timestamp value. Values less than zero - // will cause the value to decrease + // Add the given number of days or hours to the timestamp value. + // Values less than zero will cause the timestamp to decrease void AddDays(i32_t); void AddHours(i32_t); - // Read and write the timestamp value as a byte string + // Read and write the timestamp value as a byte string having + // the following format: + // | 16 bits int, big-endian | 8 bits | 8 bits | 8 bits | 8 bits | 8 bits | + // | Year A.D | Month(1-12) | Day(1-31) | Hour(0-23) | Minute(0-59) | Second(0-59) | + // virtual bool HasValue() const; virtual bool Archive(MemIOWriter* Writer) const; virtual bool Unarchive(MemIOReader* Reader); }; // - class ByteString + class ByteString : public IArchive { KM_NO_COPY_CONSTRUCT(ByteString); @@ -377,6 +390,23 @@ namespace Kumu // copy the given data into the ByteString, set Length value. // Returns error if the ByteString is too small. Result_t Set(const byte_t* buf, ui32_t buf_len); + + inline virtual bool HasValue() const { return m_Length > 0; } + + inline virtual bool Archive(MemIOWriter* Writer) const { + assert(Writer); + if ( ! Writer->WriteUi32BE(m_Length) ) return false; + if ( ! Writer->WriteRaw(m_Data, m_Length) ) return false; + return true; + } + + 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; + return true; + } }; } // namespace Kumu diff --git a/src/MPEG2_Parser.cpp b/src/MPEG2_Parser.cpp index bba10b1..791a889 100755 --- a/src/MPEG2_Parser.cpp +++ b/src/MPEG2_Parser.cpp @@ -414,6 +414,7 @@ ASDCP::MPEG2::Parser::h__Parser::OpenRead(const char* filename) if ( ASDCP_SUCCESS(result) ) { + m_ParamsDelegate.m_VDesc.ContainerDuration = m_FileReader.Size() / 65536; // a gross approximation m_Parser.SetDelegate(&m_ParserDelegate); m_FileReader.Seek(0); } diff --git a/src/MXFTypes.h b/src/MXFTypes.h index 051832b..f2bef5b 100755 --- a/src/MXFTypes.h +++ b/src/MXFTypes.h @@ -385,7 +385,7 @@ namespace ASDCP }; // - class Raw : public Kumu::ByteString, public Kumu::IArchive + class Raw : public Kumu::ByteString { ASDCP_NO_COPY_CONSTRUCT(Raw); @@ -395,7 +395,6 @@ namespace ASDCP // virtual bool Unarchive(Kumu::MemIOReader* Reader); - inline virtual bool HasValue() const { return Length() > 0; } virtual bool Archive(Kumu::MemIOWriter* Writer) const; const char* EncodeString(char* str_buf, ui32_t buf_len) const; }; diff --git a/src/PCMParserList.h b/src/PCMParserList.h index e6bf20b..ae433f0 100755 --- a/src/PCMParserList.h +++ b/src/PCMParserList.h @@ -62,11 +62,12 @@ namespace ASDCP // class PCMParserList : public std::vector { + ASDCP_NO_COPY_CONSTRUCT(PCMParserList); + + protected: PCM::AudioDescriptor m_ADesc; ui32_t m_ChannelCount; - ASDCP_NO_COPY_CONSTRUCT(PCMParserList); - public: PCMParserList(); virtual ~PCMParserList(); diff --git a/src/h__Writer.cpp b/src/h__Writer.cpp index 297c741..1d1607f 100755 --- a/src/h__Writer.cpp +++ b/src/h__Writer.cpp @@ -201,8 +201,10 @@ ASDCP::h__Writer::WriteMXFHeader(const std::string& PackageLabel, const UL& Wrap m_FilePackage->Name = PackageLabel.c_str(); m_FilePackage->PackageUID = PackageUMID; ECD->LinkedPackageUID = PackageUMID; - m_MPClip->SourcePackageID = PackageUMID; - m_MPClip->SourceTrackID = 1; + + // for now we do not allow setting this value, so all files will be 'original' + m_MPClip->SourcePackageID = NilUMID; + m_MPClip->SourceTrackID = 0; m_HeaderPart.AddChildObject(m_FilePackage); Storage->Packages.push_back(m_FilePackage->InstanceUID); diff --git a/src/kmfilegen.cpp b/src/kmfilegen.cpp index 38387a8..9ab1f00 100755 --- a/src/kmfilegen.cpp +++ b/src/kmfilegen.cpp @@ -299,7 +299,7 @@ CreateLargeFile(CommandOptions& Options) FB.Capacity(Megabyte); assert(FB.Capacity() == Megabyte); - fprintf(stderr, "Writing %lu chunks:\n", Options.chunk_count); + fprintf(stderr, "Writing %u chunks:\n", Options.chunk_count); s_Nonce = Options.chunk_count; Result_t result = Writer.OpenWrite(Options.filename); @@ -312,7 +312,7 @@ CreateLargeFile(CommandOptions& Options) CTR.FillRandom(FB.Data() + CTR.WriteSize(), Megabyte - CTR.WriteSize()); result = Writer.Write(FB.RoData(), Megabyte, &write_count); assert(write_count == Megabyte); - fprintf(stderr, "\r%8lu ", ++write_total); + fprintf(stderr, "\r%8u ", ++write_total); } } @@ -411,7 +411,7 @@ ReadValidateWriteLargeFile(CommandOptions& Options) { if ( read_count < Megabyte ) { - fprintf(stderr, "Read() returned short buffer: %lu\n", read_count); + fprintf(stderr, "Read() returned short buffer: %u\n", read_count); result = RESULT_FAIL; } @@ -421,7 +421,7 @@ ReadValidateWriteLargeFile(CommandOptions& Options) { result = Writer.Write(FB.RoData(), Megabyte, &write_count); assert(write_count == Megabyte); - fprintf(stderr, "\r%8lu ", ++write_total); + fprintf(stderr, "\r%8u ", ++write_total); } } else if ( result == RESULT_ENDOFFILE ) @@ -461,7 +461,7 @@ ValidateLargeFile(CommandOptions& Options) if ( read_count < Megabyte ) { - fprintf(stderr, "Read() returned short buffer: %lu\n", read_count); + fprintf(stderr, "Read() returned short buffer: %u\n", read_count); result = RESULT_FAIL; } else if ( KM_SUCCESS(result) ) @@ -469,7 +469,7 @@ ValidateLargeFile(CommandOptions& Options) if ( KM_SUCCESS(result) ) { - fprintf(stderr, "Validating %lu chunk%s in %s order:\n", + fprintf(stderr, "Validating %u chunk%s in %s order:\n", check_total, (check_total == 1 ? "" : "s"), Options.order); assert(read_list == 0); read_list = (read_list_t*)malloc(check_total * sizeof(read_list_t)); @@ -510,7 +510,7 @@ ValidateLargeFile(CommandOptions& Options) read_list_i < check_total && KM_SUCCESS(result); read_list_i++ ) { - fprintf(stderr, "\r%8lu [%8lu] ", read_list_i+1, read_list[read_list_i]); + fprintf(stderr, "\r%8u [%8u] ", read_list_i+1, read_list[read_list_i].nonce); result = Reader.Seek(read_list[read_list_i].position); if ( KM_SUCCESS(result) ) @@ -521,7 +521,7 @@ ValidateLargeFile(CommandOptions& Options) else if ( read_count < Megabyte ) { - fprintf(stderr, "Read() returned short buffer: %lu\n", read_count); + fprintf(stderr, "Read() returned short buffer: %u\n", read_count); result = RESULT_FAIL; } else if ( KM_SUCCESS(result) ) @@ -530,7 +530,7 @@ ValidateLargeFile(CommandOptions& Options) if ( nonce != read_list[read_list_i].nonce ) { - fprintf(stderr, "Nonce mismatch: expecting %lu, got %lu\n", + fprintf(stderr, "Nonce mismatch: expecting %u, got %u\n", nonce, read_list[read_list_i].nonce); return RESULT_FAIL; @@ -547,7 +547,7 @@ ValidateLargeFile(CommandOptions& Options) result = RESULT_OK; else { - fprintf(stderr, "Unexpected chunk count, got %lu, wanted %lu\n", + fprintf(stderr, "Unexpected chunk count, got %u, wanted %u\n", read_list_i, check_total); result = RESULT_FAIL; } diff --git a/src/wavesplit.cpp b/src/wavesplit.cpp index cdfb98e..964e616 100755 --- a/src/wavesplit.cpp +++ b/src/wavesplit.cpp @@ -74,7 +74,7 @@ wavesplit is part of asdcplib.\n\ asdcplib may be copied only under the terms of the license found at\n\ the top of every file in the asdcplib distribution kit.\n\n\ Specify the -h (help) option for further information about %s\n\n", - PACKAGE, ASDCP::Version(), PACKAGE, PACKAGE); + PACKAGE, ASDCP::Version(), PACKAGE); } // -- 2.30.2