summaryrefslogtreecommitdiff
path: root/src/Wav.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wav.cpp')
-rwxr-xr-xsrc/Wav.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/Wav.cpp b/src/Wav.cpp
index aad4b89..2ffadd4 100755
--- a/src/Wav.cpp
+++ b/src/Wav.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2005-2015, John Hurst
+Copyright (c) 2005-2018, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -548,14 +548,17 @@ ASDCP::RF64::SimpleRF64Header::ReadFromBuffer(const byte_t* buf, ui32_t buf_len,
if ( test_fcc == Wav::FCC_data )
{
- if ( chunk_size > RIFF_len )
- {
- DefaultLogSink().Error("Chunk size %u larger than file: %u\n", chunk_size, RIFF_len);
- return RESULT_RAW_FORMAT;
- }
+ if ( chunk_size != MAX_RIFF_LEN )
+ {
+ if ( chunk_size > RIFF_len )
+ {
+ DefaultLogSink().Error("Chunk size %u larger than file: %u\n", chunk_size, RIFF_len);
+ return RESULT_RAW_FORMAT;
+ }
- if (chunk_size != MAX_RIFF_LEN)
data_len = chunk_size;
+ }
+
*data_start = p - buf;
break;
}