提交 86a0f370 编写于 作者: J jp9000

libobs: Insert new filters at index 0

Technically, the "last" filter rendered is the filter at index 0, so
inserting a new filter at that point makes the most sense.
上级 c0cc81d2
......@@ -1292,15 +1292,11 @@ void obs_source_filter_add(obs_source_t *source, obs_source_t *filter)
obs_source_addref(filter);
if (source->filters.num) {
obs_source_t **back = da_end(source->filters);
(*back)->filter_target = filter;
}
filter->filter_parent = source;
filter->filter_target = source;
filter->filter_target = !source->filters.num ?
source : source->filters.array[0];
da_push_back(source->filters, &filter);
da_insert(source->filters, 0, &filter);
pthread_mutex_unlock(&source->filter_mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册