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

Fixes #223 (Add locks for cv::Mat and skip processing when the source is deactivated) #224

Merged
merged 21 commits into from
Mar 30, 2023

Conversation

umireon
Copy link
Member

@umireon umireon commented Mar 29, 2023

Prevent race condition from happening.

Hopefully fixes #223

@umireon umireon changed the title Fixes #223 (Add locks for cv::Mat and skik processing when the source is deactivated) Fixes #223 (Add locks for cv::Mat and skip processing when the source is deactivated) Mar 29, 2023
@umireon umireon marked this pull request as draft March 29, 2023 10:10
Copy link
Collaborator

@royshil royshil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use std tools for locking

src/background-filter.cpp Outdated Show resolved Hide resolved
@umireon
Copy link
Member Author

umireon commented Mar 29, 2023

I've changed the code to work with std::mutex but it revealed that using std::mutex requires the constructor of background_removal_filter to be called and thus requires #222 to be merged 🤣

@umireon umireon marked this pull request as ready for review March 29, 2023 14:07
CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Collaborator

@royshil royshil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is looking good

@umireon umireon merged commit c400276 into main Mar 30, 2023
@royshil royshil deleted the umireon.fix-crashing-223 branch April 27, 2023 14:25
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.

Race condition against cv::Mat causes OBS to crash
2 participants