libobs: Make callback optional for obs_load_sources

Due to the ability to track creation of scenes via the "source_created"
global signal, the callback parameter of obs_load_sources has become
somewhat obsolete.  This change allows the ability to pass NULL to the
callback parameter in case the callback is not needed.
This commit is contained in:
jp9000 2018-05-04 11:44:19 -07:00
parent 516c0de2e0
commit 8a1a02e7fc

View File

@ -1642,7 +1642,8 @@ void obs_load_sources(obs_data_array_t *array, obs_load_source_cb cb,
if (source->info.type == OBS_SOURCE_TYPE_TRANSITION)
obs_transition_load(source, source_data);
obs_source_load(source);
cb(private_data, source);
if (cb)
cb(private_data, source);
}
obs_data_release(source_data);
}