-
Notifications
You must be signed in to change notification settings - Fork 42
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
cec.init freezes when fails, suggested fix #61
Comments
trainman419
pushed a commit
that referenced
this issue
Feb 18, 2022
Ok; I've pushed an updated version to help with this: 227c69b Please give that a try and let me know if it helps. |
Yes that fixes it. Thank you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The CEC adapter can only be open by one caller at any one time.
If init() is called when the adapter is already open, the current code is meant to destroy the adapter resource and then raise an exception. However, I found that the code freezes when it attempts to destroy the adapter.
CECDestroy(CEC_adapter);
CEC_adapter = NULL;
I found the following code fixed it for me:
Py_BEGIN_ALLOW_THREADS
CECDestroy(CEC_adapter);
CEC_adapter = NULL;
Py_END_ALLOW_THREADS
The text was updated successfully, but these errors were encountered: