Skip to content

linux-jack: Keep the client on unchanged updates; fallback timestamps use the server rate (Refs #1464) - #1557

Merged
zackees merged 3 commits into
masterfrom
fix/jack-source-name
Oct 20, 2026
Merged

zackees merged 3 commits into
masterfrom
fix/jack-source-name

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

  • jack-input.c.h: jack_update() stores the client name as OBS Studio: <name> but compared it with the bare source name, so every update (even with unchanged settings) closed and reopened the JACK client and dropped capture. It now compares without the prefix.
  • jack-wrapper.c.h: when jack_get_cycle_times() fails, the guessed timestamp divided by data->samples_per_sec, which is never set (0): integer divide by zero. It now uses the server rate it just read (out.samples_per_sec).

RED → GREEN

  • RED commit: adea8564b adds test/cmocka/test_jack_input.c (JACK replaced by test/cmocka/jack-stubs/jack/jack.h and fake libjack functions, so it builds without ENABLE_JACK). On master unchanged_update_keeps_client fails (3 client opens instead of 1) and fallback_timestamp_uses_server_rate dies with SIGFPE (divide by zero); renamed_source_reopens_client passes (guard).
  • 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 0d1f171 Oct 20, 2026
23 checks passed
@zackees
zackees deleted the fix/jack-source-name 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