libobs: Always enumerate filter list in reverse
The "last" filter that's rendered is technically at filter index 0, so enumeration needs to be from the last index in the list to the first index in the list.master
parent
64943f3fc6
commit
98a6c8f0d0
|
@ -2551,8 +2551,8 @@ void obs_source_enum_filters(obs_source_t *source,
|
|||
|
||||
pthread_mutex_lock(&source->filter_mutex);
|
||||
|
||||
for (size_t i = 0; i < source->filters.num; i++) {
|
||||
struct obs_source *filter = source->filters.array[i];
|
||||
for (size_t i = source->filters.num; i > 0; i--) {
|
||||
struct obs_source *filter = source->filters.array[i - 1];
|
||||
callback(source, filter, param);
|
||||
}
|
||||
|
||||
|
|
|
@ -1370,8 +1370,8 @@ obs_data_t *obs_save_source(obs_source_t *source)
|
|||
pthread_mutex_lock(&source->filter_mutex);
|
||||
|
||||
if (source->filters.num) {
|
||||
for (size_t i = 0; i < source->filters.num; i++) {
|
||||
obs_source_t *filter = source->filters.array[i];
|
||||
for (size_t i = source->filters.num; i > 0; i--) {
|
||||
obs_source_t *filter = source->filters.array[i - 1];
|
||||
obs_data_t *filter_data = obs_save_source(filter);
|
||||
obs_data_array_push_back(filters, filter_data);
|
||||
obs_data_release(filter_data);
|
||||
|
|
Loading…
Reference in New Issue