Skip to content

Add WebSocket replay buffer paths and fix OBS exit crashes - #182

Merged
exeldro merged 2 commits into
exeldro:masterfrom
Melvin-Molder:emit-replay-buffer-path
Jul 5, 2026
Merged

exeldro merged 2 commits into
exeldro:masterfrom
Melvin-Molder:emit-replay-buffer-path

Conversation

@Melvin-Molder

@Melvin-Molder Melvin-Molder commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

This merge implements support for specifying replay buffer save paths via the WebSocket flow, and resolves some memory management and threading bugs discovered during testing.

While testing the WebSocket changes, closing OBS on Windows 11 triggered a c0000005 access violation. Debugging the teardown sequence revealed multiple reference counting and race conditions that have been corrected here.

Changes

  • WebSocket Support: Added the core feature to allow replay save path propagation through the WebSocket flow, including fallback path resolution.
  • Fixed Teardown Deadlock: Removed the 3-second os_sleep_ms(10) loop in source_record_filter_destroy that could stall OBS/plugin shutdown over lingering references.
  • Fixed Scene Memory Corruption: Removed an invalid obs_source_release(parent); call in source_record_replay_saved that incorrectly decremented reference counts during replay saves.
  • Fixed Use-After-Free in Audio: Reworked audio_input_callback to use a release_audio flag so obs_source_release(audio_source); is deferred safely across all early exit paths.
  • Fixed Saved Event Race: Stopped disconnecting the replay "saved" signal too early so async replay writes can still emit the saved event.
  • Improved Replay Path Handling: Initialized fallback proc calldata with calldata_init and ensured event emission still occurs even when path resolution fails.

@Melvin-Molder

Copy link
Copy Markdown
Contributor Author

Forgot about the windows build change made to also allow for standalone windows builds.

  • Added a local plugin version fallback so builds do not depend on generated PROJECT_VERSION in every environment.
  • Fixed standalone Windows linking by using OBS::w32-pthreads instead of raw w32-pthreads.
  • Updated ignore rules for generated/local files (version.h, source-record.rc, CMakeUserPresets.json).
  • Added standalone Windows build instructions in README with dynamic obs-deps/qt-deps folder discovery.

@exeldro

exeldro commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Thank you for the pull request. Some of the changes look interesting, but I am not interested in the build changes. Can you remove those from the pull request?

@Melvin-Molder
Melvin-Molder force-pushed the emit-replay-buffer-path branch from 10607a5 to 63bb59e Compare July 5, 2026 00:06
@Melvin-Molder
Melvin-Molder force-pushed the emit-replay-buffer-path branch from 63bb59e to ee24c4f Compare July 5, 2026 00:52
@Melvin-Molder

Copy link
Copy Markdown
Contributor Author

Think I got it all removed now, I accidentally committed both in one commit so had to redo the history.

@exeldro
exeldro merged commit e3985ec into exeldro:master Jul 5, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants