diff --git a/plugins/rtmp-services/rtmp-common.c b/plugins/rtmp-services/rtmp-common.c index 965e4fd7b..ae7e21b12 100644 --- a/plugins/rtmp-services/rtmp-common.c +++ b/plugins/rtmp-services/rtmp-common.c @@ -247,12 +247,12 @@ static bool fill_twitch_servers_locked(obs_property_t *servers_prop) { size_t count = twitch_ingest_count(); - obs_property_list_add_string(servers_prop, - obs_module_text("Server.Auto"), "auto"); - if (count <= 1) return false; + obs_property_list_add_string(servers_prop, + obs_module_text("Server.Auto"), "auto"); + for (size_t i = 0; i < count; i++) { struct twitch_ingest ing = twitch_ingest(i); obs_property_list_add_string(servers_prop, ing.name, ing.url); diff --git a/plugins/rtmp-services/twitch.c b/plugins/rtmp-services/twitch.c index a81eb2f3c..ea17e3a55 100644 --- a/plugins/rtmp-services/twitch.c +++ b/plugins/rtmp-services/twitch.c @@ -28,14 +28,6 @@ static void free_ingests(void) da_free(cur_ingests); } -static inline void init_defaults(void) -{ - struct ingest ingest = {0}; - ingest.name = bstrdup("Default"); - ingest.url = bstrdup("rtmp://live.twitch.tv/app"); - da_push_back(cur_ingests, &ingest); -} - static void load_ingests(const char *json, bool write_file) { json_t *root; @@ -100,8 +92,6 @@ static void load_ingests(const char *json, bool write_file) bfree(cache_new); finish: - if (!cur_ingests.num) - init_defaults(); if (root) json_decref(root); } @@ -157,8 +147,6 @@ void load_twitch_data(const char *module_str) pthread_mutex_unlock(&mutex); bfree(data); - } else { - init_defaults(); } twitch_update_info = update_info_create_single(