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 FileVideoStream last frame being None #262

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

Conversation

tapani-hopkins
Copy link

When FileVideoStream reaches the end of the file, it takes one more frame (which is NoneType) and tries to transform and add it to the queue. This causes an error if the transform expects a valid frame, or if the main script does not expect the last frame in the Queue to be NoneType.
This has also been noted in issue #251 .

When FileVideoStream reaches the end of the file, it takes one more frame (which is NoneType) and tries to transform and add it to the queue. This has also been noted in issue PyImageSearch#251 . This causes an error if the transform expects a valid frame, or if the main script does not expect the last frame in the Queue to be NoneType.
@tapani-hopkins
Copy link
Author

Just noticed that this has been proposed earlier, PR #187. There are also #119 and #137 which address the same issue, with an else statement instead of a break.

@ariG23498
Copy link

Hey @tapani-hopkins

Thanks for the PR we will consider this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants