From 28cdebdc9e0d2b152a7cc133a90f1b9ddb8f3193 Mon Sep 17 00:00:00 2001 From: Richard Stanway Date: Sun, 23 Feb 2020 00:17:55 +0100 Subject: [PATCH] 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. --- UI/window-basic-main-outputs.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/UI/window-basic-main-outputs.cpp b/UI/window-basic-main-outputs.cpp index 029cc0866..f68093c25 100644 --- a/UI/window-basic-main-outputs.cpp +++ b/UI/window-basic-main-outputs.cpp @@ -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()); }