提交 1343d6bd 编写于 作者: J jp9000

libobs: Allow deferred source udpate on create

This allows sources to optionally defer update on creation in order to
prevent updates from being called from threads other than the video
thread.
上级 1c8e27f2
......@@ -364,14 +364,14 @@ void obs_source_update(obs_source_t source, obs_data_t settings)
{
if (!source) return;
obs_data_apply(source->context.settings, settings);
if (settings)
obs_data_apply(source->context.settings, settings);
if (source->context.data && source->info.update) {
if (source->info.output_flags & OBS_SOURCE_VIDEO)
source->defer_update = true;
else
source->info.update(source->context.data,
source->context.settings);
if (source->info.output_flags & OBS_SOURCE_VIDEO) {
source->defer_update = true;
} else if (source->context.data && source->info.update) {
source->info.update(source->context.data,
source->context.settings);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册