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

Redefine stop frame sentinel #936

Merged
merged 4 commits into from
Jul 18, 2021
Merged

Redefine stop frame sentinel #936

merged 4 commits into from
Jul 18, 2021

Conversation

DanRStevens
Copy link
Collaborator

Reference: #935, #920, #925, #797

Redefine the stop frame sentinel value from -1 to 0. Add backwards compatibility for -1, which can be removed later after data is updated. Make the "delay" field in XML files optional, with a default value of 0, equivalent to the new stop frame sentinel value.

Allow 0 to be used as the new sentinel value. Allow the old sentinel
value of -1 to continue to work while we transition to new value.

The field is unsigned, so a value of 0 fits better than -1. Particularly
since neither 0 nor -1 would have a sensible use as a `frameDelay`.
Further, it will simplify the code if `0` is exluded as a possible delay
for frames that are not stop frames.
This allows either the old or the new sentinel value to be used for stop
frames.
The `frameDelay` is an `unsigned` quantity, so it can only be <= 0 when
it is == 0. Since 0 was added as a new sentinel value for stop frames,
the check above already handles this case.
Set a default delay value equivalent to a stop frame.
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.

1 participant