0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00

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.
This commit is contained in:
jp9000 2017-05-21 01:40:12 -07:00
parent e6f9a73235
commit 8416c9fbae

View File

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