mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-19 09:41:32 +08:00
Merge pull request #5860 from obsproject/deprecate-addref
Deprecate addref for obs objects
This commit is contained in:
@@ -133,8 +133,7 @@ static obs_source_t *get_transition(struct slideshow *ss)
|
||||
obs_source_t *tr;
|
||||
|
||||
pthread_mutex_lock(&ss->mutex);
|
||||
tr = ss->transition;
|
||||
obs_source_addref(tr);
|
||||
tr = obs_source_get_ref(ss->transition);
|
||||
pthread_mutex_unlock(&ss->mutex);
|
||||
|
||||
return tr;
|
||||
@@ -151,8 +150,7 @@ static obs_source_t *get_source(struct darray *array, const char *path)
|
||||
const char *cur_path = files.array[i].path;
|
||||
|
||||
if (strcmp(path, cur_path) == 0) {
|
||||
source = files.array[i].source;
|
||||
obs_source_addref(source);
|
||||
source = obs_source_get_ref(files.array[i].source);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -892,8 +892,9 @@ static void syphon_release(void *param)
|
||||
|
||||
static inline obs_properties_t *syphon_properties_internal(syphon_t s)
|
||||
{
|
||||
if (s)
|
||||
obs_source_addref(s->source);
|
||||
if (s && obs_source_get_ref(s->source) == NULL) {
|
||||
s = NULL;
|
||||
}
|
||||
|
||||
obs_properties_t *props =
|
||||
obs_properties_create_param(s, syphon_release);
|
||||
|
||||
Reference in New Issue
Block a user