From 3bbefc5b5733452156e777a0d29fc626a435b84f Mon Sep 17 00:00:00 2001 From: jp9000 Date: Fri, 27 Mar 2015 12:38:38 -0700 Subject: [PATCH] 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. --- obs/window-basic-main-outputs.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/obs/window-basic-main-outputs.cpp b/obs/window-basic-main-outputs.cpp index e6957877b..981551be5 100644 --- a/obs/window-basic-main-outputs.cpp +++ b/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]);