mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
rtmp-services: Always copy service info to settings
This commit is contained in:
parent
4029ff2ac1
commit
1959f6852e
@ -133,6 +133,8 @@ static const char *get_protocol(json_t *service, obs_data_t *settings)
|
||||
return "RTMP";
|
||||
}
|
||||
|
||||
static void copy_info_to_settings(json_t *service, obs_data_t *settings);
|
||||
|
||||
static void rtmp_common_update(void *data, obs_data_t *settings)
|
||||
{
|
||||
struct rtmp_common *service = data;
|
||||
@ -176,6 +178,8 @@ static void rtmp_common_update(void *data, obs_data_t *settings)
|
||||
}
|
||||
|
||||
if (serv) {
|
||||
copy_info_to_settings(serv, settings);
|
||||
|
||||
json_t *rec = json_object_get(serv, "recommended");
|
||||
if (json_is_object(rec)) {
|
||||
update_recommendations(service, rec);
|
||||
@ -532,6 +536,13 @@ static void update_protocol(json_t *service, obs_data_t *settings)
|
||||
obs_data_set_string(settings, "protocol", "RTMP");
|
||||
}
|
||||
|
||||
static void copy_info_to_settings(json_t *service, obs_data_t *settings)
|
||||
{
|
||||
fill_more_info_link(service, settings);
|
||||
fill_stream_key_link(service, settings);
|
||||
update_protocol(service, settings);
|
||||
}
|
||||
|
||||
static inline json_t *find_service(json_t *root, const char *name,
|
||||
const char **p_new_name)
|
||||
{
|
||||
@ -598,9 +609,8 @@ static bool service_selected(obs_properties_t *props, obs_property_t *p,
|
||||
}
|
||||
|
||||
fill_servers(obs_properties_get(props, "server"), service, name);
|
||||
fill_more_info_link(service, settings);
|
||||
fill_stream_key_link(service, settings);
|
||||
update_protocol(service, settings);
|
||||
copy_info_to_settings(service, settings);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user