mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
audio: Load .WAV files with format->blockalign==0.
In theory this is illegal, but legit wavefiles in the field do it, and it's easy to bump it to 1 for general purposes. Formats with more specific alignment requirements already check for them separately. Fixes #7714.
This commit is contained in:
@@ -1709,7 +1709,7 @@ static int WaveCheckFormat(WaveFile *file, size_t datalength)
|
||||
|
||||
/* All supported formats must have a proper block size. */
|
||||
if (format->blockalign == 0) {
|
||||
return SDL_SetError("Invalid block alignment");
|
||||
format->blockalign = 1; /* force it to 1 if it was unset. */
|
||||
}
|
||||
|
||||
/* If the fact chunk is valid and the appropriate hint is set, the
|
||||
|
Reference in New Issue
Block a user