Explorar o código

mac-syphon: Replace source addref calls with get_ref

Jim %!s(int64=3) %!d(string=hai) anos
pai
achega
404ebdbd51
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      plugins/mac-syphon/syphon.m

+ 3 - 2
plugins/mac-syphon/syphon.m

@@ -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);