-
Notifications
You must be signed in to change notification settings - Fork 368
Is animation #1255
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
Open
bmatherly
wants to merge
5
commits into
master
Choose a base branch
from
is_animation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+159
−5
Open
Is animation #1255
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4ca7c5a
Add a unit test for url with equals sign
bmatherly 12e5256
Improve animation-string detection in mlt_property_is_anim
bmatherly 37e0103
Fix the test regression that was caused by animation detection improv…
bmatherly e81f052
Fix possible deadlock condition
bmatherly a80ef5e
Abort parsing keyframes if an invalid frame/time encountered
bmatherly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree with this. "foo=bar;50=100" should not be an animation. What does "foo=bar" mean? is it just junk that should be ignored? Not a bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. It should definitely return immediately if false, and "foo" is not a valid time value--short circuit. But this does not continue validating items if
is_keyframe_token()is true. IOW, does `mlt_property_is_anim("50=100;foo=bar") return true? I consider that an animation even though it is not entirely valid. If it walks and talks like an animation; it is an animation. OTOH something like "Love = everything; you = my world" is not an animation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could add a test for that if we want it to work. In that case, "foo=bar" will just be considered junk and the end of the animation parsing. For example, "50=100;foo=bar;60=120" would be the same as "50=100" because the "foo=bar" would cause the parsing to abort. In addition to the extra test for that, I would also update the documentation to explain:
Does that seem good?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is my expectation. I think a unit test is desirable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This idea conflicts with an existing unit test:
https://github.com/mltframework/mlt/blob/master/src/tests/test_animation/test_animation.cpp#L355
The current behavior for this test string is that the parser assigns the frame to 0 and uses that if a frame/time can not be parsed from the string token.
So, with the current behavior, 50=100;foo=bar;60=120 becomes
0=foo=bar
50=100
60=120
It is easy to change the existing test. Do we want to do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spirit of that sub-test is "anim strings may contain equal signs if quoted" and your change keeps that. That test is an extreme outlier case. Change the test to add a frame key to resolve it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done