Просмотр исходного кода

UI: Only apply service settings to stream encoder

All audio encoders are currently having the service-specific settings
applied to them, so this makes it so that it checks which track the
stream is set to and only applies it to that specific encoder.
jp9000 10 лет назад
Родитель
Сommit
3bbefc5b57
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      obs/window-basic-main-outputs.cpp

+ 3 - 1
obs/window-basic-main-outputs.cpp

@@ -561,6 +561,8 @@ inline void AdvancedOutput::UpdateAudioSettings()
 			"Track4Name");
 	bool applyServiceSettings = config_get_bool(main->Config(), "AdvOut",
 			"ApplyServiceSettings");
+	int streamTrackIndex = config_get_int(main->Config(), "AdvOut",
+			"TrackIndex");
 	obs_data_t *settings[4];
 
 	for (size_t i = 0; i < 4; i++)
@@ -577,7 +579,7 @@ inline void AdvancedOutput::UpdateAudioSettings()
 	SetEncoderName(aacTrack[3], name4, "Track4");
 
 	for (size_t i = 0; i < 4; i++) {
-		if (applyServiceSettings)
+		if (applyServiceSettings && (int)i == streamTrackIndex)
 			obs_service_apply_encoder_settings(main->GetService(),
 					nullptr, settings[i]);