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
obs-websocket: RemoveInput keeps the scene items of the input in scenes that are not rendered #1613
The protocol documentation says that RemoveInput "will immediately remove all associated scene items". It does not. The request returns success, but the input and its scene items stay in each scene that is not rendered. GetSceneItemList and GetInputList continue to show them.
RequestHandler::RemoveInput() (src/requesthandler/RequestHandler_Inputs.cpp) calls only obs_source_remove(). libobs does not remove the scene items of a removed source at that time. It removes them later, in update_transforms_and_prune_sources(), which runs only from scene_video_render() or from obs_scene_prune_sources(). Thus:
In a scene that is on program or preview, the items go away on the next frame.
In a scene that is not rendered (not on program, not in Studio Mode preview, not nested in a rendered scene, no projector), the items stay until that scene is rendered or until OBS restarts.
While the items stay, scene_save() writes them to the scene collection, but obs_save_sources() skips the removed source. On the next load, each of these items gives a "source not found" warning.
The frontend does not have this problem: after obs_source_remove() for a scene, RemoveSceneAndReleaseNested() (frontend/widgets/OBSBasic_Scenes.cpp.hpp) calls obs_scene_prune_sources() on all scenes.
Upstream obs-websocket and upstream OBS have the same code.
Measured
obs-rust master (33.0.0-beta6 line), Linux, headless. Program scene = "Scene", Studio Mode off.
CreateScene "zz test" (not rendered).
CreateInput in "zz test", kind color_source_v3.
RemoveInput → success.
GetSceneItemList("zz test") and GetInputList after 0 s, 2 s and 5 s: the item and the input are still there.
RemoveScene("zz test"): the frontend prunes all scenes; the item and the input go away.
Proposed fix
In RemoveInput, after obs_source_remove(), call obs_scene_prune_sources() on each scene (obs_enum_scenes(), source id scene), as the frontend does. Groups are pruned through their parent scene.
Test
A cmocka test (pattern of test_ws_current_scene_removed) that compiles the plugin's input requests against real libobs. It adds an input to a scene that is not rendered, sends RemoveInput, and checks that the scene has no item for the input when the request returns.
I will make the PR (RED, then GREEN; the fix in obs-rust/obs-websocket, then the submodule update) and verify it on a headless Linux OBS.
@vpacher are you still on this? The claim is past 48 h with no PR. If you've moved on, reply Releasing #1613 (or say nothing for another day) and I'll pick it up: prune the removed source's scene items in Rust OBS so the unchanged obs-websocket RemoveInput matches its documented behavior.
Yes, I am still on this. The fix is in obs-rust/obs-websocket#20 (opened 10-21). The claim bot does not see PRs in other repositories, so it shows no PR on this issue.
#20 changes RemoveInput to call obs_scene_prune_sources() on every scene of every public canvas after obs_source_remove(). The frontend does the same after it removes a scene. The scene items of the input are then removed before the request returns, as the protocol documents. If you prefer the prune in Rust OBS core (so that an unchanged obs-websocket works), tell me and I will move the fix there.
Thanks, keep it in obs-websocket#20. Upstream OBS has the same libobs behavior and upstream obs-websocket the same bug, so pruning in the request handler (as the frontend does) is a plain plugin bug fix, not a change made for Rust OBS. Moving it into libobs would change obs_source_remove() semantics relative to upstream, which Tier 2/3 parity would then have to explain. Once #20 merges, the submodule bump here closes this issue.
Activity
vpacher commentedon Oct 21, 2026
Claiming: #1613
zackees commentedon Oct 23, 2026
@vpacher are you still on this? The claim is past 48 h with no PR. If you've moved on, reply
Releasing #1613(or say nothing for another day) and I'll pick it up: prune the removed source's scene items in Rust OBS so the unchanged obs-websocket RemoveInput matches its documented behavior.vpacher commentedon Oct 24, 2026
Yes, I am still on this. The fix is in obs-rust/obs-websocket#20 (opened 10-21). The claim bot does not see PRs in other repositories, so it shows no PR on this issue.
#20 changes
RemoveInputto callobs_scene_prune_sources()on every scene of every public canvas afterobs_source_remove(). The frontend does the same after it removes a scene. The scene items of the input are then removed before the request returns, as the protocol documents. If you prefer the prune in Rust OBS core (so that an unchanged obs-websocket works), tell me and I will move the fix there.zackees commentedon Oct 24, 2026
Thanks, keep it in obs-websocket#20. Upstream OBS has the same libobs behavior and upstream obs-websocket the same bug, so pruning in the request handler (as the frontend does) is a plain plugin bug fix, not a change made for Rust OBS. Moving it into libobs would change obs_source_remove() semantics relative to upstream, which Tier 2/3 parity would then have to explain. Once #20 merges, the submodule bump here closes this issue.
docs: Record the RemoveInput scene item fix in the features ledger
plugins/obs-websocket: Remove the scene items of a removed input (obs…
test/cmocka: Wait for the destroy queue between RemoveInput cases (ob…