You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
libobs: Transition audio can take its timestamp from a removed child after the audio stop #2185
obs_transition_audio_render() (libobs/obs-source-transition.c.h) drops removed children only on its first pass:
sources[0] =transition->transition_sources[0];
sources[1] =transition->transition_sources[1];
if (sources[0] &&obs_source_removed(sources[0])) sources[0] =NULL;
if (sources[1] &&obs_source_removed(sources[1])) sources[1] =NULL;
min_ts=transition_calc_min_ts(sources);
if (min_ts) {
...
sources[0] =transition->transition_sources[0]; /* re-read, removed check not repeated */sources[1] =transition->transition_sources[1];
min_ts=transition_calc_min_ts(sources);
The second read, after a possible audio stop, doesn't repeat the removed check from ea9e4ca. So a removed child can count toward min_ts and go into the copied state. If its audio timestamp is older, it sets *ts_out, which can delay or drop the other child's audio for that tick.
Found by reading the code while porting the transition steps (#2184). It hasn't been reproduced. Upstream has the same code.
Plan
RED: a real-libobs test with a transition between two audio sources.
Mark one source removed (obs_source_remove) while it still has an older audio timestamp.
Render the transition's audio, with and without the audio stop on that tick.
Check that *ts_out and the mixed audio come only from the live child.
If the state can't be reached through the public API, show why and close this issue.
GREEN: repeat the removed check after the re-read, or factor both reads into one helper. Transitions without removed children behave exactly as before.
Claiming: #2185. Now unblocked, since #2184 has merged.
Plan: RED is a real-libobs Tier 2 test with a transition between two audio sources. One child is removed and has an older timestamp, and the audio stop happens on that tick; the test checks that ts_out comes only from the live child. GREEN repeats the removed check after the re-read, in both the C code and the Rust transition step if that one mirrors it. PR expected today.
Fixed by #2256. obs_transition_audio_render now leaves out a removed child source on both reads, including the re-read after the audio thread stops the transition. Test: test_transition_removed_child_audio (Tier 2, Linux). It skips when the video thread stops the transition first, a race the test can't control. Nothing left. Related local-build problem: #2244.
Activity
zackees commentedon Oct 24, 2026
Claiming: #2185. Now unblocked, since #2184 has merged.
Plan: RED is a real-libobs Tier 2 test with a transition between two audio sources. One child is removed and has an older timestamp, and the audio stop happens on that tick; the test checks that
ts_outcomes only from the live child. GREEN repeats the removed check after the re-read, in both the C code and the Rust transition step if that one mirrors it. PR expected today.zackees commentedon Oct 24, 2026
Fixed by #2256.
obs_transition_audio_rendernow leaves out a removed child source on both reads, including the re-read after the audio thread stops the transition. Test:test_transition_removed_child_audio(Tier 2, Linux). It skips when the video thread stops the transition first, a race the test can't control. Nothing left. Related local-build problem: #2244.libobs: Transition audio leaves out a removed child after the audio s…
test: Characterize the transition audio render
obs-source: Add transition audio Tier 1 tests
obs-source: Port the transition audio render
test: Characterize the transition audio render
obs-source: Add transition audio Tier 1 tests
obs-source: Port the transition audio render
obs-source: Port the transition audio render (obs-rust#4095)