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

Allow repeating the command between parameters #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arch1t3cht
Copy link
Contributor

Originally part of #9, but made a separate PR because it changes parsing logic.

Drawing strings like b 0 0 100 200 300 400 internally translate to something like b 0 0 b 100 200 b 300 400 on both libass and xy-VSFilter, so the latter string will have the same effect. But upon encountering b 0 0 b 100 200 300 400, ASSFoundation will error out with a message like "incorrect number of ordinates for command 'b': expected 6, got 2".

This commit skips repetitions of the currently active drawing commands in parameters. The code only triggers after encountering parameters to commands that wouldn't cast to numbers, so it shouldn't change parsing for drawing strings that assf previously considered valid. Still, it can change behavior when encountering "invalid" drawings.

Drawing strings like 'b 0 0 100 200 300 400' internally translate to
something like 'b 0 0 b 100 200 b 300 400' on both libass and
xy-VSFilter, so the latter string will have the same effect. This commit
skips repetitions of the currently active drawing commands in
parameters.
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