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

Fix for seeking non-existent video frames beyond end of video #33

Merged

Conversation

jpgill86
Copy link
Collaborator

get_frame was sometimes called with a target_frame greater than the last frame index. This could occur when dragging the navigation slider all the way to the end, or when trying to step beyond the end of the video. This caused get_frame_absolut_seek to spend 250 iterations in its reseek loop, and the video would freeze for many seconds until this loop completed.

This commit adds a check to get_frame: if the target_frame exceeds the final frame index, the final frame is fetched instead.

`get_frame` was sometimes called with a `target_frame` greater than the last frame index. This could occur when dragging the navigation slider all the way to the end, or when trying to step beyond the end of the video. This caused `get_frame_absolut_seek` to spend 250 iterations in its `reseek` loop, and the video would freeze for many seconds until this loop completed.

This commit adds a check to `get_frame`: if the `target_frame` exceeds the final frame index, the final frame is fetched instead.
@jpgill86 jpgill86 added the bug label May 19, 2019
@jpgill86 jpgill86 merged commit 9cb4e61 into NeuralEnsemble:master May 19, 2019
@jpgill86 jpgill86 deleted the fix-video-seek-beyond-max-frame branch May 19, 2019 05:42
@samuelgarcia
Copy link
Collaborator

Cool, you are taking teh leadrship for teh video player : cool!!!

@jpgill86 jpgill86 added this to the 1.1.0 milestone Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants