Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes forward frame-stepping position desync by synchronizing _position and raising PositionChanged when stepping forward changes playback time.
Changes:
- After
NextFrame(), readsVlcPlayer.Timeand converts it to aTimeSpan - Updates
_positionwhen changed and raisesPositionChangedwith old/new values
Comment on lines
+521
to
+523
| var oldValue = _position; | ||
| _position = newValue; | ||
| PositionChanged?.Invoke(this, new ValueChangedEventArgs<TimeSpan>(newValue, oldValue)); |
There was a problem hiding this comment.
This introduces an inline _position update + PositionChanged raise pattern. If this class already has a single place that mutates _position (e.g., a Position setter, SetPosition(...), or a helper that raises PositionChanged), consider routing this through that shared path to keep event semantics consistent and prevent future drift between different position-update call sites.
Suggested change
| var oldValue = _position; | |
| _position = newValue; | |
| PositionChanged?.Invoke(this, new ValueChangedEventArgs<TimeSpan>(newValue, oldValue)); | |
| Position = newValue; |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
huynhsontung
approved these changes
Mar 5, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
StepForwardOneFramenow checks for position changes after advancing a frame and raises thePositionChangedevent if the time has changed. Close #787.