Merge pull request #5860 from obsproject/deprecate-addref

Deprecate addref for obs objects
This commit is contained in:
Jim
2022-01-25 05:55:52 -08:00
committed by GitHub
19 changed files with 223 additions and 111 deletions
+2 -4
View File
@@ -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;
}
}
+3 -2
View File
@@ -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);