Skip to content

obs-outputs: Join completed null output stop threads (Refs #1464) - #1560

Merged
zackees merged 2 commits into
masterfrom
fix/null-output-stop-join
Oct 20, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/null-output-stop-join

Conversation

@zackees

@zackees zackees commented Oct 20, 2026

Copy link
Copy Markdown
Member

Refs #1464 (split from it: one small PR per fix)

What and why

The stop thread cleared stop_thread_active itself 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, and stop joins a previous stop thread before starting another.

RED → GREEN

  • RED commit: 3ae820a28 adds test/cmocka/test_null_output_stop_thread.c: the real null-output.c with libobs output calls and pthread_create/pthread_join wrapped 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.
  • GREEN: the fix cherry-picked unchanged from fix: 20 bug fixes in libobs callbacks, muxer, audio and build #1464; the new test passes. Checked locally by compiling the new test against the plugin source at both commits (obs-rust-linux-validate image, minimal libobs stand-in); PR CI (Tier 2) is the gate.
  • Real app: not run (no UI or log change beyond the fix itself).

Checklist

@zackees
zackees enabled auto-merge October 20, 2026 20:22
@zackees
zackees added this pull request to the merge queue Oct 20, 2026
Merged via the queue into master with commit 95744cd Oct 20, 2026
23 checks passed
@zackees
zackees deleted the fix/null-output-stop-join branch October 26, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant