Repository navigation
fix(output): copy the stop signal's last error before shutting down unstarted encoders - #2087
Merged
Merged
Conversation
…nstarted encoders (#2086)
zackees
enabled auto-merge
October 24, 2026 07:35
Member
Author
This was referenced Oct 24, 2026
Closed
chriscoveries
pushed a commit
to chriscoveries/obsrust-fork
that referenced
this pull request
Oct 24, 2026
…bs-rust#2098) (obs-rust#2100) The active path of obs_output_end_data_capture_internal created end_data_capture_thread and then read the encoders' last_error for the stop signal, while the thread's obs_encoder_shutdown freed it. Copy the params first and emit them after, as obs-rust#2087 did for the not-active path. Fixes obs-rust#2098
This was referenced Oct 24, 2026
6 of 7 tasks
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.
Fixes #2086
obs_output_end_data_capture_internalstartsshutdown_unstarted_encoders_threadand then sends the stop signal. The signal'slast_errorcomes from the encoders'last_error_message, which the thread frees (obs_encoder_shutdown→obs_encoder_set_last_error(NULL)). The stop parameters are now built first (calldata_set_stringcopies the string) and sent after the thread starts. The thread order is unchanged: a stop handler that restarts the output still waits for the shutdown in start.signal_stop()is split intostop_params_initandsignal_stop_params, and the other callers are unchanged.RED: TSan run 40066620813 on master has 46 data-race reports in 14 tests (obs-encoder.c.h:2231 against obs-output.c.h:2706). Only TSan shows this race reliably, so there is no Tier 2 RED; GREEN is a TSan run on this branch, linked below. PR CI runs Tier 2 for unchanged behavior (test_output_failed_start_encoders covers this path).
./lintpasses. obs-output has no Rust port.