mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user