ソースを参照

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.
jp9000 8 年 前
コミット
8416c9fbae
1 ファイル変更12 行追加5 行削除
  1. 12 5
      UI/window-basic-auto-config.cpp

+ 12 - 5
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",
+	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);
 
-	wiz->customServer = ui->streamType->currentIndex() == 1;
-
 	int bitrate = 10000;
 	if (!ui->doBandwidthTest->isChecked()) {
 		bitrate = ui->bitrate->value();