From 8416c9fbae03048043d225fae07dbd5555ad47cc Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 21 May 2017 01:40:12 -0700 Subject: [PATCH] UI: Fix autoconfig capping bitrate with "custom server" When custom server is used, it would still use the "common" RTMP service to cap its bitrate. So if Twitch was selected and you changed over to custom RTMP server, it would still cap to Twitch's bitrate limits even though you're not using Twitch anymore. --- UI/window-basic-auto-config.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/UI/window-basic-auto-config.cpp b/UI/window-basic-auto-config.cpp index 581b76511..84113507a 100644 --- a/UI/window-basic-auto-config.cpp +++ b/UI/window-basic-auto-config.cpp @@ -274,15 +274,22 @@ bool AutoConfigStreamPage::validatePage() { OBSData service_settings = obs_data_create(); obs_data_release(service_settings); - obs_data_set_string(service_settings, "service", - QT_TO_UTF8(ui->service->currentText())); - - OBSService service = obs_service_create("rtmp_common", "temp_service", - service_settings, nullptr); - obs_service_release(service); wiz->customServer = ui->streamType->currentIndex() == 1; + const char *serverType = wiz->customServer + ? "rtmp_custom" + : "rtmp_common"; + + if (!wiz->customServer) { + obs_data_set_string(service_settings, "service", + QT_TO_UTF8(ui->service->currentText())); + } + + OBSService service = obs_service_create(serverType, "temp_service", + service_settings, nullptr); + obs_service_release(service); + int bitrate = 10000; if (!ui->doBandwidthTest->isChecked()) { bitrate = ui->bitrate->value();