-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix importing WAV files with odd chunk sizes #85556
Conversation
CC @lawnjelly if you want to review and take inspiration to fix your own WAV importer :P |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm no expert in RIFF files but it does seem like chunks should be padded like this:
https://www.daubnet.com/en/file-format-riff
unused 1 byte present, if size is odd
Ah, yes, I could have quoted a source. I got my info from Wikpedia: https://en.wikipedia.org/wiki/Resource_Interchange_File_Format
|
Same email/account attribution issue on this PR :) |
These require a padding byte not included in the chunk size.
0b4f0ea
to
2981037
Compare
Merci. :) |
Cherry-picked for 4.2.1. |
Fixes #85466.
The RIFF specification requires a padding byte to be written when a chunk size is not even. The current WAV importer did not include that byte when moving to the next chunk, so the import would fail (read a zero-length file) when the file contained a chunk with an odd size before the actual
data
chunk.