Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ufleisch
Copy link
Contributor

@ufleisch ufleisch commented Nov 2, 2024

The size of FLAC metadata blocks is stored in only 24 bits. Remove blocks exceeding this limit when saving FLAC and Ogg FLAC files.

@scotchi
Copy link
Member

scotchi commented Nov 2, 2024

I wonder if providing a constant or a "blockOverMaxSize(...)" or something might be useful?

The size of FLAC metadata blocks is stored in only 24 bits. Remove
blocks exceeding this limit when saving FLAC and Ogg FLAC files.
@ufleisch
Copy link
Contributor Author

I wonder if providing a constant or a "blockOverMaxSize(...)" or something might be useful?

As this issue is caused at a low level (reusing the most significant byte of a 32-bit size so that actually only 24 bits are usable), I think that the fix is more readable if it also operates on this low level.

@ufleisch ufleisch merged commit 90f62a3 into taglib:master Nov 14, 2024
6 checks passed
@scotchi
Copy link
Member

scotchi commented Nov 14, 2024

I don't have a strong opinion on this, but I actually meant for users of the API to check images against so that they wouldn't be silently dropped.

@ufleisch ufleisch deleted the flac-too-large-pic branch June 14, 2025 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants