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.
This commit is contained in:
jp9000
2016-05-26 08:13:21 -07:00
parent 0c5fd7a0fb
commit cb9ce7547d
+4
View File
@@ -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,