Repository navigation
obs-outputs: Join completed null output stop threads (Refs #1464) - #1560
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1464 (split from it: one small PR per fix)
What and why
The stop thread cleared
stop_thread_activeitself when it finished, so the next start and destroy saw nothing to join: every completed stop left a joinable thread unjoined (stack and handle leaked, e.g. on each auto-config encoder test). The flag is now cleared only by the joiner, andstopjoins a previous stop thread before starting another.RED → GREEN
3ae820a28addstest/cmocka/test_null_output_stop_thread.c: the realnull-output.cwith libobs output calls andpthread_create/pthread_joinwrapped to count stop threads and joins and to report when a stop thread has returned (so the test waits deterministically). Two sessions start/stop/start/stop/destroy: on master 2 threads are created and 0 joined; with the fix both are joined.Checklist
masterdocs/features.mdis added (wording from fix: 20 bug fixes in libobs callbacks, muxer, audio and build #1464)./lintpasses