Skip to content
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

Pass the size to check on an element #218

Merged
merged 1 commit into from
Jan 14, 2024
Merged

Conversation

robUx4
Copy link
Contributor

@robUx4 robUx4 commented Jan 13, 2024

Rather than ValidateSize() which requires to set the value on the element first, we can check if the size is valid before doing it, or rejecting the element in that case.

On top of #212 and #213.

It might be possible to get the information from the element specs (and avoid creating an element just to delete right after), but that will be for another Pull Request.

@robUx4 robUx4 added api-break breaks the API (e.g. programs using it will have to adjust their source code) abi-break breaks the ABI (e.g. programs linked against the library have to be recompiled) labels Jan 13, 2024
We should not have to force the element to have a size to check if it's valid.
It may end up in a state where it's invalid.

We keep a ValidateSize() method for compatibility (VLC).
@robUx4 robUx4 marked this pull request as ready for review January 14, 2024 07:17
@robUx4 robUx4 merged commit bfa9202 into Matroska-Org:master Jan 14, 2024
15 checks passed
@robUx4 robUx4 deleted the valid_size branch January 14, 2024 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abi-break breaks the ABI (e.g. programs linked against the library have to be recompiled) api-break breaks the API (e.g. programs using it will have to adjust their source code)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants