From cb9ce7547db96ef20d59d1f800a9671efb1a4d68 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Wed, 25 May 2016 19:43:35 -0700 Subject: [PATCH] libobs: Fix bug activating/showing transitions in a tree When a transition is a sub-source of another source, it would not call the transition's active source enum function, meaning that any sources the transition had would not increment their active/showing refs (it would only be called when activating the transition directly before). That would result in negative/invalid active/showing refs on its sub-sources, causing them to become permanently active/inactive and/or permanently showing/hidden. --- libobs/obs-source.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libobs/obs-source.c b/libobs/obs-source.c index e465dc04f..8b38923a0 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -2910,7 +2910,11 @@ static void enum_source_tree_callback(obs_source_t *parent, obs_source_t *child, void *param) { struct source_enum_data *data = param; + bool is_transition = child->info.type == OBS_SOURCE_TYPE_TRANSITION; + if (is_transition) + obs_transition_enum_sources(child, + enum_source_tree_callback, param); if (child->info.enum_active_sources) { if (child->context.data) { child->info.enum_active_sources(child->context.data,