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

libobs: Do not lock sources mutex unnecessarily #11820

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

Conversation

Lain-B
Copy link
Collaborator

@Lain-B Lain-B commented Feb 3, 2025

Description

The sources mutex does not need to be manually locked when calling obs_load_sources().

Motivation and Context

Noticed that #11687 was opened due to the fact that the sources mutex was being locked here. #11687 will probably be unnecessary after merging this PR.

How Has This Been Tested?

Only lightly tested. Things seem okay but could use some extra testing.

Types of changes

  • Code cleanup (non-breaking change which makes code smaller or more readable)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.

In obs_load_sources(), the master sources mutex was being locked
seemingly unnecessarily. This could cause race conditions if used
incorrectly.
@Lain-B Lain-B added Bug Fix Non-breaking change which fixes an issue Code Cleanup Non-breaking change which makes code smaller or more readable labels Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Non-breaking change which fixes an issue Code Cleanup Non-breaking change which makes code smaller or more readable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant