Skip to content

Commit c5b5fea

Browse files
author
Matthew Sheby
committed
fix: handle odd-sized wav chunks
1 parent 32220b3 commit c5b5fea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Wav.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ ASDCP::Wav::SimpleWaveHeader::ReadFromBuffer(const byte_t* buf, ui32_t buf_len,
157157
while ( p < end_p )
158158
{
159159
test_fcc = fourcc(p); p += 4;
160-
ui32_t chunk_size = KM_i32_LE(Kumu::cp2i<ui32_t>(p)); p += sizeof(ui32_t);
160+
ui32_t chunk_size = KM_i32_LE(Kumu::cp2i<ui32_t>(p) + (Kumu::cp2i<ui32_t>(p) % 2)); p += sizeof(ui32_t);
161161

162162
if ( test_fcc == FCC_data )
163163
{

0 commit comments

Comments
 (0)