UI: Don't set audio encoder track index in Adv Output

The audio track should always be 0 for RTMP output. The previous code
accidentally used the audio track index to set the encoder track index.
If the chosen audio track was track 2, this enabled the experimental
multi-track RTMP output code. This then caused streams to fail as if
there were network problems, as popular RTMP services like Twitch don't
understand the multi-track RTMP stream and the connection hangs.
This commit is contained in:
Richard Stanway 2020-02-23 00:17:55 +01:00
parent 2f22139670
commit 28cdebdc9e

View file

@ -1282,8 +1282,6 @@ inline void AdvancedOutput::SetupStreaming()
bool rescale = config_get_bool(main->Config(), "AdvOut", "Rescale");
const char *rescaleRes =
config_get_string(main->Config(), "AdvOut", "RescaleRes");
int streamTrack =
config_get_int(main->Config(), "AdvOut", "TrackIndex") - 1;
unsigned int cx = 0;
unsigned int cy = 0;
@ -1294,7 +1292,7 @@ inline void AdvancedOutput::SetupStreaming()
}
}
obs_output_set_audio_encoder(streamOutput, streamAudioEnc, streamTrack);
obs_output_set_audio_encoder(streamOutput, streamAudioEnc, 0);
obs_encoder_set_scaled_size(h264Streaming, cx, cy);
obs_encoder_set_video(h264Streaming, obs_get_video());
}