Browse Source

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.
Richard Stanway 5 years ago
parent
commit
28cdebdc9e
1 changed files with 1 additions and 3 deletions
  1. 1 3
      UI/window-basic-main-outputs.cpp

+ 1 - 3
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());
 }