Skip to content

Commit

Permalink
WAV : Fix rewriting large files with BEXT chunk before DATA chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeugma440 committed Apr 5, 2023
1 parent 269adf1 commit 06407e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ATL/AudioData/IO/WAV.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ private bool readWAV(Stream source, ReadTagParams readTagParams)
{
riffChunkSize = StreamUtils.DecodeInt64(data64);
riffChunkSizePos = source.Position - 8;
formattedRiffChunkSize = getFormattedRiffChunkSize(riffChunkSize, isRf64);
}

source.Read(data64, 0, 8); // dataSize
Expand Down Expand Up @@ -345,7 +346,6 @@ private bool readWAV(Stream source, ReadTagParams readTagParams)
if (AudioDataSize > 0 && (uint.MaxValue == chunkSize || 0x00FFFFFF == chunkSize)) chunkSize = AudioDataSize;
else AudioDataSize = chunkSize;
headerSize = riffChunkSize - AudioDataSize;
formattedRiffChunkSize = getFormattedRiffChunkSize(riffChunkSize, isRf64);
}
else if (subChunkId.Equals(CHUNK_FACT, StringComparison.OrdinalIgnoreCase))
{
Expand Down

0 comments on commit 06407e6

Please sign in to comment.