more printf format fixes
authorjhurst <jhurst@cinecert.com>
Tue, 30 May 2006 07:11:19 +0000 (07:11 +0000)
committerjhurst <>
Tue, 30 May 2006 07:11:19 +0000 (07:11 +0000)
17 files changed:
src/AS_DCP_JP2K.cpp
src/AS_DCP_MPEG2.cpp
src/AS_DCP_PCM.cpp
src/Index.cpp
src/JP2K.cpp
src/JP2K_Codestream_Parser.cpp
src/KLV.cpp
src/KM_fileio.cpp
src/KM_util.cpp
src/MPEG.cpp
src/MPEG2_Parser.cpp
src/MXF.cpp
src/PCM_Parser.cpp
src/Wav.cpp
src/asdcp-version.cpp
src/h__Reader.cpp
src/wavesplit.cpp

index ce4d5af37124691cf6ddb876707dfa53feaa821f..a1071cf7e0ec957406ab5d7333c9ad89749a00ff 100755 (executable)
@@ -219,7 +219,7 @@ ASDCP::JP2K::FrameBuffer::Dump(FILE* stream, ui32_t dump_len) const
   if ( stream == 0 )
     stream = stderr;
 
-  fprintf(stream, "Frame: %06lu, %7lu bytes", m_FrameNumber, m_Size);
+  fprintf(stream, "Frame: %06u, %7u bytes", m_FrameNumber, m_Size);
   
   fputc('\n', stream);
 
index 04010be32af86aae2589a718cc9f726e41448e24..9e229053d047dbad9468a7d932496866d18da57f 100755 (executable)
@@ -264,7 +264,7 @@ ASDCP::MPEG2::FrameBuffer::Dump(FILE* stream, ui32_t dump_len) const
   if ( stream == 0 )
     stream = stderr;
 
-  fprintf(stream, "Frame: %06lu, %c%-2hu, %7lu bytes",
+  fprintf(stream, "Frame: %06u, %c%-2hu, %7u bytes",
          m_FrameNumber, FrameTypeChar(m_FrameType), m_TemporalOffset, m_Size);
 
   if ( m_GOPStart )
index e5260e47646384a9f0007c46c12154c96c4eb581..38bf8e478c09781f2a1338cfed0fac3617e5487b 100755 (executable)
@@ -215,7 +215,7 @@ ASDCP::PCM::FrameBuffer::Dump(FILE* stream, ui32_t dump_len) const
   if ( stream == 0 )
     stream = stderr;
 
-  fprintf(stream, "Frame: %06lu, %7lu bytes\n",
+  fprintf(stream, "Frame: %06u, %7u bytes\n",
          m_FrameNumber, m_Size);
 
   if ( dump_len )
index 5e0743c8333ed1e0d89b5e8a6ba5f76392b2e1d4..c37db1b2ff959a7ef60c973218be5b61e1e0af89 100755 (executable)
@@ -125,7 +125,7 @@ ASDCP::MXF::IndexTableSegment::Dump(FILE* stream)
     }
   else
     {
-      fprintf(stream, "  IndexEntryArray: %lu entries\n", IndexEntryArray.size());
+      fprintf(stream, "  IndexEntryArray: %u entries\n", IndexEntryArray.size());
     }
 }
 
index ee979ba02951a86a5651d259a130e1757e0a4feb..3c798ceef3352293bb1dac5dfc53407cf7f01ead 100755 (executable)
@@ -89,7 +89,7 @@ ASDCP::JP2K::GetNextMarker(const byte_t** buf, JP2K::Marker& Marker)
 
   if ( Marker.m_DataSize != 0 && Marker.m_DataSize < 3 )
     {
-      DefaultLogSink().Error("Illegal data size: %lu\n", Marker.m_DataSize);
+      DefaultLogSink().Error("Illegal data size: %u\n", Marker.m_DataSize);
       return ASDCP::RESULT_FAIL;
     }
 
@@ -120,15 +120,15 @@ ASDCP::JP2K::Accessor::SIZ::Dump(FILE* stream)
 
   fprintf(stream, "SIZ: \n");
   fprintf(stream, "  Rsize: %hu\n", Rsize());
-  fprintf(stream, "  Xsize: %lu\n", Xsize());
-  fprintf(stream, "  Ysize: %lu\n", Xsize());
-  fprintf(stream, " XOsize: %lu\n", XOsize());
-  fprintf(stream, " YOsize: %lu\n", XOsize());
-  fprintf(stream, " XTsize: %lu\n", XTsize());
-  fprintf(stream, " YTsize: %lu\n", XTsize());
-  fprintf(stream, "XTOsize: %lu\n", XTOsize());
-  fprintf(stream, "YTOsize: %lu\n", YTOsize());
-  fprintf(stream, "  Csize: %lu\n", Csize());
+  fprintf(stream, "  Xsize: %u\n", Xsize());
+  fprintf(stream, "  Ysize: %u\n", Xsize());
+  fprintf(stream, " XOsize: %u\n", XOsize());
+  fprintf(stream, " YOsize: %u\n", XOsize());
+  fprintf(stream, " XTsize: %u\n", XTsize());
+  fprintf(stream, " YTsize: %u\n", XTsize());
+  fprintf(stream, "XTOsize: %u\n", XTOsize());
+  fprintf(stream, "YTOsize: %u\n", YTOsize());
+  fprintf(stream, "  Csize: %u\n", Csize());
 
   if ( Csize() > 0 )
     {
@@ -138,8 +138,8 @@ ASDCP::JP2K::Accessor::SIZ::Dump(FILE* stream)
        {
          ImageComponent TmpComp;
          ReadComponent(i, TmpComp);
-         fprintf(stream, "%lu: ", i);
-         fprintf(stream, "%lu, %lu, %lu\n", TmpComp.Ssize, TmpComp.XRsize, TmpComp.YRsize);
+         fprintf(stream, "%u: ", i);
+         fprintf(stream, "%u, %u, %u\n", TmpComp.Ssize, TmpComp.XRsize, TmpComp.YRsize);
        }
     }
 }
index 700233f56fc83f6eb5f728d6acb836af0210b721..4211653ecad528f5a51f58d77924763e40862909 100755 (executable)
@@ -67,7 +67,7 @@ public:
 
        if ( FB.Capacity() < file_size )
          {
-           DefaultLogSink().Error("FrameBuf.Capacity: %lu frame length: %lu\n", FB.Capacity(), (ui32_t)file_size);
+           DefaultLogSink().Error("FrameBuf.Capacity: %u frame length: %u\n", FB.Capacity(), (ui32_t)file_size);
            return RESULT_SMALLBUF;
          }
       }
@@ -91,7 +91,7 @@ public:
          {
            result = GetNextMarker(&p, NextMarker);
 #if 0
-           fprintf(stderr, "%s Length: %lu\n",
+           fprintf(stderr, "%s Length: %u\n",
                    GetMarkerString(NextMarker.m_Type), NextMarker.m_DataSize);
 #endif
 
@@ -121,7 +121,7 @@ public:
 
                  if ( m_PDesc.Csize != 3 )
                    {
-                     DefaultLogSink().Error("Unexpected number of components: %lu\n", m_PDesc.Csize);
+                     DefaultLogSink().Error("Unexpected number of components: %u\n", m_PDesc.Csize);
                      return RESULT_RAW_FORMAT;
                    }
 
@@ -133,7 +133,7 @@ public:
              case MRK_COD:
                if ( NextMarker.m_DataSize > DefaultCodingDataLength )
                  {
-                   DefaultLogSink().Error("Unexpectedly large CodingStyle data: %lu\n", NextMarker.m_DataSize);
+                   DefaultLogSink().Error("Unexpectedly large CodingStyle data: %u\n", NextMarker.m_DataSize);
                    return RESULT_RAW_FORMAT;
                  }
 
@@ -144,7 +144,7 @@ public:
              case MRK_QCD:
                if ( NextMarker.m_DataSize > DefaultCodingDataLength )
                  {
-                   DefaultLogSink().Error("Unexpectedly large QuantDefault data: %lu\n", NextMarker.m_DataSize);
+                   DefaultLogSink().Error("Unexpectedly large QuantDefault data: %u\n", NextMarker.m_DataSize);
                    return RESULT_RAW_FORMAT;
                  }
 
index f4a1580e51848d34bd0982e97ae2a19cf42e672a..0e7d783989fa12d4bade3eaf4fc0c463b687586d 100755 (executable)
@@ -139,7 +139,7 @@ ASDCP::KLVPacket::Dump(FILE* stream, bool show_hex)
        fprintf(stream, "%02x.", m_KeyStart[i]);
 
       const MDDEntry* Entry = Dict::FindUL(m_KeyStart);
-      fprintf(stream, "\b  len: %7lu (%s)\n", m_ValueLength, (Entry ? Entry->name : "Unknown"));
+      fprintf(stream, "\b  len: %7u (%s)\n", m_ValueLength, (Entry ? Entry->name : "Unknown"));
 
       if ( show_hex && m_ValueLength < 1000 )
        Kumu::hexdump(m_ValueStart, Kumu::xmin(m_ValueLength, (ui32_t)64), stream);
@@ -181,7 +181,7 @@ ASDCP::KLVFilePacket::InitFromFile(const Kumu::FileReader& Reader)
 
   if ( read_count < (SMPTE_UL_LENGTH + 1) )
     {
-      DefaultLogSink().Error("Short read of Key and Length got %lu\n", read_count);
+      DefaultLogSink().Error("Short read of Key and Length got %u\n", read_count);
       return RESULT_READFAIL;
     }
 
@@ -238,7 +238,7 @@ ASDCP::KLVFilePacket::InitFromFile(const Kumu::FileReader& Reader)
     {
       if ( read_count < tmp_read_size )
        {
-         DefaultLogSink().Error("Short read of packet body, expecting %lu, got %lu\n",
+         DefaultLogSink().Error("Short read of packet body, expecting %u, got %u\n",
                                 m_Buffer.Size(), read_count);
          return RESULT_READFAIL;
        }
@@ -252,7 +252,7 @@ ASDCP::KLVFilePacket::InitFromFile(const Kumu::FileReader& Reader)
       
          if ( read_count != remainder )
            {
-             DefaultLogSink().Error("Short read of packet body, expecting %lu, got %lu\n",
+             DefaultLogSink().Error("Short read of packet body, expecting %u, got %u\n",
                                     remainder+tmp_read_size, read_count+tmp_read_size);
              result = RESULT_READFAIL;
            }
index 4453e89d59ad48b6ec09c3046370d7ba5725e7cc..464d47fd005a4b389350aecdaaa3dfc04e48440a 100644 (file)
@@ -200,7 +200,7 @@ Kumu::FileWriter::Writev(const byte_t* buf, ui32_t buf_len)
 
   if ( iov->m_Count >= IOVecMaxEntries )
     {
-      DefaultLogSink().Error("The iovec is full! Only %lu entries allowed before a flush.\n",
+      DefaultLogSink().Error("The iovec is full! Only %u entries allowed before a flush.\n",
                             IOVecMaxEntries);
       return RESULT_FAIL;
     }
index e9157ec9327989731d0a5be4891c5e91c5e4d645..a07d33e3986e5616519b83a29564052230ead53b 100755 (executable)
@@ -532,14 +532,14 @@ Kumu::write_BER(byte_t* buf, ui64_t val, ui32_t ber_len)
     { // sanity check BER length
       if ( ber_len > 9 )
         {
-          DefaultLogSink().Error("BER size %lu exceeds maximum size of 9\n", ber_len);
+          DefaultLogSink().Error("BER size %u exceeds maximum size of 9\n", ber_len);
           return false;
         }
       
       if ( val & ber_masks[ber_len - 1] )
         {
          ui64Printer tmp_i(val);
-          DefaultLogSink().Error("BER size %lu too small for value %s\n", tmp_i.c_str());
+          DefaultLogSink().Error("BER size %u too small for value %s\n", tmp_i.c_str());
           return false;
         }
     }
@@ -825,7 +825,7 @@ Kumu::Timestamp::DecodeString(const char* datestr)
   ui32_t TZ_mm = atoi(datestr + 23);
 
   if ( TZ_mm != 0 )
-    DefaultLogSink().Error("Ignoring sub-hours timezone offset: %lu\n", TZ_mm);
+    DefaultLogSink().Error("Ignoring sub-hours timezone offset: %u\n", TZ_mm);
  
   if ( TZ_hh > 12 )
     DefaultLogSink().Error("Ignoring large timezone offset: %s\n", (datestr+19));
index 0c4e49c9623d5922edad16d4e83b6aa25cf0ad25..9bd2acee7e42980f68dd6b02d51277fea97aa5ec 100755 (executable)
@@ -222,7 +222,7 @@ ASDCP::MPEG2::VESParser::Parse(const byte_t* buf, ui32_t buf_len)
                case GOP_START:   result = m_Delegate->GOP(this, m_HBuf, m_HBufLen);       break;
 
                default:
-                 DefaultLogSink().Error("Unexpected start code: %02x at byte %lu\n",
+                 DefaultLogSink().Error("Unexpected start code: %02x at byte %u\n",
                                         m_HBuf[3], (ui32_t)(p - buf));
                  result = RESULT_RAW_FORMAT;
                }
index af7396f1e6428f6307f07124d76847351b2dc946..bba10b1ab29215ab89c132cd96454db9af45f860 100755 (executable)
@@ -460,7 +460,7 @@ ASDCP::MPEG2::Parser::h__Parser::ReadFrame(FrameBuffer& FB)
     {
       if ( FB.Capacity() < ( write_offset + VESReadSize ) )
        {
-         DefaultLogSink().Error("FrameBuf.Capacity: %lu FrameLength: %lu\n",
+         DefaultLogSink().Error("FrameBuf.Capacity: %u FrameLength: %u\n",
                                 FB.Capacity(), ( write_offset + VESReadSize ));
          return RESULT_SMALLBUF;
        }
index ab30389f8333e0fb443df6ffec38355b22560541..9d4fba82f246ddd01b9eb9b3856db49fafd3c98b 100755 (executable)
@@ -325,15 +325,15 @@ ASDCP::MXF::Partition::Dump(FILE* stream)
   KLVFilePacket::Dump(stream, false);
   fprintf(stream, "  MajorVersion       = %hu\n", MajorVersion);
   fprintf(stream, "  MinorVersion       = %hu\n", MinorVersion);
-  fprintf(stream, "  KAGSize            = %lu\n", KAGSize);
+  fprintf(stream, "  KAGSize            = %u\n",  KAGSize);
   fprintf(stream, "  ThisPartition      = %s\n",  ui64sz(ThisPartition, identbuf));
   fprintf(stream, "  PreviousPartition  = %s\n",  ui64sz(PreviousPartition, identbuf));
   fprintf(stream, "  FooterPartition    = %s\n",  ui64sz(FooterPartition, identbuf));
   fprintf(stream, "  HeaderByteCount    = %s\n",  ui64sz(HeaderByteCount, identbuf));
   fprintf(stream, "  IndexByteCount     = %s\n",  ui64sz(IndexByteCount, identbuf));
-  fprintf(stream, "  IndexSID           = %lu\n", IndexSID);
+  fprintf(stream, "  IndexSID           = %u\n",  IndexSID);
   fprintf(stream, "  BodyOffset         = %s\n",  ui64sz(BodyOffset, identbuf));
-  fprintf(stream, "  BodySID            = %lu\n", BodySID);
+  fprintf(stream, "  BodySID            = %u\n",  BodySID);
   fprintf(stream, "  OperationalPattern = %s\n",  OperationalPattern.EncodeString(identbuf, IdentBufferLen));
   fputs("Essence Containers:\n", stream); EssenceContainers.Dump(stream, false);
 
@@ -497,7 +497,7 @@ ASDCP::MXF::Primer::Dump(FILE* stream)
     stream = stderr;
 
   KLVPacket::Dump(stream, false);
-  fprintf(stream, "Primer: %lu %s\n",
+  fprintf(stream, "Primer: %u %s\n",
          LocalTagEntryBatch.size(),
          ( LocalTagEntryBatch.size() == 1 ? "entry" : "entries" ));
   
@@ -577,7 +577,7 @@ ASDCP::MXF::Preface::Dump(FILE* stream)
   InterchangeObject::Dump(stream);
   fprintf(stream, "  %22s = %s\n",  "LastModifiedDate", LastModifiedDate.EncodeString(identbuf, IdentBufferLen));
   fprintf(stream, "  %22s = %hu\n", "Version", Version);
-  fprintf(stream, "  %22s = %lu\n", "ObjectModelVersion", ObjectModelVersion);
+  fprintf(stream, "  %22s = %u\n", "ObjectModelVersion", ObjectModelVersion);
   fprintf(stream, "  %22s = %s\n",  "PrimaryPackage", PrimaryPackage.EncodeHex(identbuf, IdentBufferLen));
   fprintf(stream, "  %22s:\n", "Identifications");  Identifications.Dump(stream);
   fprintf(stream, "  %22s = %s\n",  "ContentStorage", ContentStorage.EncodeHex(identbuf, IdentBufferLen));
@@ -618,7 +618,7 @@ ASDCP::MXF::OPAtomHeader::InitFromFile(const Kumu::FileReader& Reader)
        {
          // OP-Atom states that there will be either two or three partitions,
          // one closed header and one closed footer with an optional body
-         DefaultLogSink().Error("RIP count is not 2 or 3: %lu\n", test_s);
+         DefaultLogSink().Error("RIP count is not 2 or 3: %u\n", test_s);
          return RESULT_FORMAT;
        }
       else
@@ -662,7 +662,7 @@ ASDCP::MXF::OPAtomHeader::InitFromFile(const Kumu::FileReader& Reader)
   if ( ASDCP_SUCCESS(result) )
     {
       if ( HeaderByteCount < 1024 )
-       DefaultLogSink().Warn("Improbably small HeaderByteCount value: %lu\n", HeaderByteCount);
+       DefaultLogSink().Warn("Improbably small HeaderByteCount value: %u\n", HeaderByteCount);
 
       result = m_Buffer.Capacity(HeaderByteCount);
     }
@@ -674,7 +674,7 @@ ASDCP::MXF::OPAtomHeader::InitFromFile(const Kumu::FileReader& Reader)
 
       if ( ASDCP_SUCCESS(result) && read_count != m_Buffer.Capacity() )
        {
-         DefaultLogSink().Error("Short read of OP-Atom header metadata; wanted %lu, got %lu\n",
+         DefaultLogSink().Error("Short read of OP-Atom header metadata; wanted %u, got %u\n",
                                 m_Buffer.Capacity(), read_count);
          return RESULT_FAIL;
        }
@@ -772,7 +772,7 @@ ASDCP::MXF::OPAtomHeader::WriteToFile(Kumu::FileWriter& Writer, ui32_t HeaderSiz
 
   if ( HeaderSize < 4096 ) 
     {
-      DefaultLogSink().Error("HeaderSize %lu is too small. Must be >= 4096\n", HeaderSize);
+      DefaultLogSink().Error("HeaderSize %u is too small. Must be >= 4096\n", HeaderSize);
       return RESULT_FAIL;
     }
 
@@ -818,7 +818,7 @@ ASDCP::MXF::OPAtomHeader::WriteToFile(Kumu::FileWriter& Writer, ui32_t HeaderSiz
       if ( pos > (Kumu::fpos_t)HeaderByteCount )
        {
          char intbuf[IntBufferLen];
-         DefaultLogSink().Error("Header size %s exceeds specified value %lu\n",
+         DefaultLogSink().Error("Header size %s exceeds specified value %u\n",
                                 ui64sz(pos, intbuf),
                                 HeaderSize);
          return RESULT_FAIL;
@@ -904,7 +904,7 @@ ASDCP::MXF::OPAtomIndexFooter::InitFromFile(const Kumu::FileReader& Reader)
 
   if ( ASDCP_SUCCESS(result) && read_count != m_Buffer.Capacity() )
     {
-      DefaultLogSink().Error("Short read of footer partition: got %lu, expecting %lu\n",
+      DefaultLogSink().Error("Short read of footer partition: got %u, expecting %u\n",
                             read_count, m_Buffer.Capacity());
       return RESULT_FAIL;
     }
index f3e32db64ff760a108fbc5720433fc4d854f16dd..f0caef270fc6c58be48e4af6746a47834b0bd041 100755 (executable)
@@ -144,7 +144,7 @@ ASDCP::PCM::WAVParser::h__WAVParser::ReadFrame(FrameBuffer& FB)
 
   if ( FB.Capacity() < m_FrameBufferSize )
     {
-      DefaultLogSink().Error("FrameBuf.Capacity: %lu FrameLength: %lu\n",
+      DefaultLogSink().Error("FrameBuf.Capacity: %u FrameLength: %u\n",
                             FB.Capacity(), m_FrameBufferSize);
       return RESULT_SMALLBUF;
     }
index 92bd5e7306d241f64aef5085507c1dc8c751afc9..6c0c0db6c347fb435a4454b4b4ab37b0e25cba3c 100755 (executable)
@@ -161,7 +161,7 @@ ASDCP::Wav::SimpleWaveHeader::ReadFromBuffer(const byte_t* buf, ui32_t buf_len,
        {
          if ( chunk_size > RIFF_len )
            {
-             DefaultLogSink().Error("Chunk size %lu larger than file: %lu\n", chunk_size, RIFF_len);
+             DefaultLogSink().Error("Chunk size %u larger than file: %u\n", chunk_size, RIFF_len);
              return RESULT_RAW_FORMAT;
            }
 
@@ -335,7 +335,7 @@ ASDCP::AIFF::SimpleAIFFHeader::ReadFromBuffer(const byte_t* buf, ui32_t buf_len,
        {
          if ( chunk_size > RIFF_len )
             {
-              DefaultLogSink().Error("Chunk size %lu larger than file: %lu\n", chunk_size, RIFF_len);
+              DefaultLogSink().Error("Chunk size %u larger than file: %u\n", chunk_size, RIFF_len);
               return RESULT_RAW_FORMAT;
             }
 
@@ -344,7 +344,6 @@ ASDCP::AIFF::SimpleAIFFHeader::ReadFromBuffer(const byte_t* buf, ui32_t buf_len,
 
          data_len = chunk_size - 8;
          *data_start = (p - buf) + offset;
-         fprintf(stderr, "*data_start: %p\n", *data_start);
          break;
        }
       else
index 148f69d58bb814a71fd786ca2ee2c4ff176b0156..ee3348010bfa1e73b81af7170c86e36126342e73 100755 (executable)
@@ -36,7 +36,7 @@ using namespace ASDCP;
 int
 main()
 {
-  printf("%lu.%lu.%lu", VERSION_MAJOR, VERSION_APIMINOR, VERSION_IMPMINOR);
+  printf("%u.%u.%u", VERSION_MAJOR, VERSION_APIMINOR, VERSION_IMPMINOR);
   return 0;
 }
 
index 268f3086624f74e038484cd68bfdaea2cb2bccef..1ebc5d41023b8fc3aa4bda27aaf747212a34a298 100755 (executable)
@@ -186,7 +186,7 @@ ASDCP::h__Reader::ReadEKLVPacket(ui32_t FrameNum, ASDCP::FrameBuffer& FrameBuf,
 
   if ( ASDCP_FAILURE(m_FooterPart.Lookup(FrameNum, TmpEntry)) )
     {
-      DefaultLogSink().Error("Frame value out of range: %lu\n", FrameNum);
+      DefaultLogSink().Error("Frame value out of range: %u\n", FrameNum);
       return RESULT_RANGE;
     }
 
@@ -285,7 +285,7 @@ ASDCP::h__Reader::ReadEKLVPacket(ui32_t FrameNum, ASDCP::FrameBuffer& FrameBuf,
          
       if ( FrameBuf.Capacity() < SourceLength )
        {
-         DefaultLogSink().Error("FrameBuf.Capacity: %lu SourceLength: %lu\n", FrameBuf.Capacity(), SourceLength);
+         DefaultLogSink().Error("FrameBuf.Capacity: %u SourceLength: %u\n", FrameBuf.Capacity(), SourceLength);
          return RESULT_SMALLBUF;
        }
 
@@ -294,7 +294,7 @@ ASDCP::h__Reader::ReadEKLVPacket(ui32_t FrameNum, ASDCP::FrameBuffer& FrameBuf,
       // read ESV length
       if ( ! Kumu::read_test_BER(&ess_p, esv_length) )
        {
-         DefaultLogSink().Error("read_test_BER did not return %lu\n", esv_length);
+         DefaultLogSink().Error("read_test_BER did not return %u\n", esv_length);
          return RESULT_FORMAT;
        }
 
@@ -329,7 +329,12 @@ ASDCP::h__Reader::ReadEKLVPacket(ui32_t FrameNum, ASDCP::FrameBuffer& FrameBuf,
       else // return ciphertext to caller
        {
          if ( FrameBuf.Capacity() < tmp_len )
-           return RESULT_SMALLBUF;
+           {
+             char intbuf[IntBufferLen];
+             DefaultLogSink().Error("FrameBuf.Capacity: %u FrameLength: %s\n",
+                                    FrameBuf.Capacity(), ui64sz(PacketLength, intbuf));
+             return RESULT_SMALLBUF;
+           }
 
          memcpy(FrameBuf.Data(), ess_p, tmp_len);
          FrameBuf.Size(tmp_len);
@@ -342,7 +347,7 @@ ASDCP::h__Reader::ReadEKLVPacket(ui32_t FrameNum, ASDCP::FrameBuffer& FrameBuf,
        if ( FrameBuf.Capacity() < PacketLength )
        {
          char intbuf[IntBufferLen];
-         DefaultLogSink().Error("FrameBuf.Capacity: %lu FrameLength: %s\n",
+         DefaultLogSink().Error("FrameBuf.Capacity: %u FrameLength: %s\n",
                                 FrameBuf.Capacity(), ui64sz(PacketLength, intbuf));
          return RESULT_SMALLBUF;
        }
index 2a40e1ecacfad7153c851612bc55dbb57f233eb7..cdfb98ee53385ec67340c18e06579a831bdf31fe 100755 (executable)
@@ -237,7 +237,7 @@ split_wav_file(CommandOptions& Options)
 
       if ( Options.verbose_flag )
        {
-         fprintf(stderr, "48Khz PCM Audio, %s fps (%lu spf)\n", "24",
+         fprintf(stderr, "48Khz PCM Audio, %s fps (%u spf)\n", "24",
                  PCM::CalcSamplesPerFrame(ADesc));
          fputs("AudioDescriptor:\n", stderr);
          PCM::AudioDescriptorDump(ADesc);
@@ -285,7 +285,7 @@ split_wav_file(CommandOptions& Options)
          if ( FrameBuffer.Size() != FrameBuffer.Capacity() )
            {
              fprintf(stderr, "WARNING: Last frame read was short, PCM input is possibly not frame aligned.\n");
-             fprintf(stderr, "Expecting %lu bytes, got %lu.\n", FrameBuffer.Capacity(), FrameBuffer.Size());
+             fprintf(stderr, "Expecting %u bytes, got %u.\n", FrameBuffer.Capacity(), FrameBuffer.Size());
              result = RESULT_ENDOFFILE;
              continue;
            }