Skip to content

Conversation

@arch1t3cht
Copy link
Member

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