Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
FLAC: Fails to save if file contains too large picture block with invalid block size #226
As reported by zas (Laurent Monin) per mail.
As making sure that everything which we can read can also be saved back and we don't make the resulting file more broken we should write those too large images back anyway.
…block. (Fixes isse #226) In case the file contains a flac image block which has a invalid block size and the containing data is larger than what can be contained in a picture block we successfully load the file since we ignore the block size and use the picture size instead. When saving, this will fail as we want to write the correct block size back which is in this case too large. Instead remember the incorrect block size in case the real block size was too large and save it back as is. This allows us to save everything we load and write invalid flac files only if the source was invalid is well.