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.
This commit is contained in:
parent
99060e5bf2
commit
3bbefc5b57
@ -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]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user