Skip to content

Commit

Permalink
Fix memory leak (missing release of source settings)
Browse files Browse the repository at this point in the history
  • Loading branch information
vwout committed Feb 4, 2024
1 parent a073d9a commit 9f42374
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion obs-visca-control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1219,11 +1219,15 @@ local function source_signal_processor(source_settings, source_name, signal)
if program_scene_active and current_program_scene_name ~= program_scene_name then
for _, program_source_name, program_source_settings, program_source_is_visible in
get_plugin_settings_from_scene(program_scene_name, camera_id) do
if program_source_is_visible then
if program_source_settings ~= nil and program_source_is_visible then
log("Run shutdown action for scene '%s' source '%s' (camera %d) before activation of '%s'",
program_scene_name, program_source_name, camera_id, current_program_scene_name)
do_cam_scene_action(program_source_settings, scene_action_at.Stop)
end

if program_source_settings ~= nil then
obs.obs_data_release(program_source_settings)
end
end

-- Set the program scene for which stop actions are already executed to false
Expand Down

0 comments on commit 9f42374

Please sign in to comment.