mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-01 15:49:51 +08:00
frontend: Do not set maximum_video_tracks if user has set it to "Auto"
This commit is contained in:
committed by
Ryan Foster
parent
63206664e0
commit
a45bbe134f
@@ -73,13 +73,11 @@ GoLiveApi::PostData constructGoLivePost(QString streamKey, const std::optional<u
|
||||
|
||||
if (maximum_aggregate_bitrate.has_value())
|
||||
preferences.maximum_aggregate_bitrate = maximum_aggregate_bitrate.value();
|
||||
if (maximum_video_tracks.has_value())
|
||||
preferences.maximum_video_tracks = maximum_video_tracks.value();
|
||||
|
||||
/* Always cap to maximum number of output encoders. */
|
||||
if (!preferences.maximum_video_tracks.has_value() ||
|
||||
preferences.maximum_video_tracks.value() > MAX_OUTPUT_VIDEO_ENCODERS) {
|
||||
preferences.maximum_video_tracks = MAX_OUTPUT_VIDEO_ENCODERS;
|
||||
if (maximum_video_tracks.has_value()) {
|
||||
/* Cap to maximum supported number of output encoders. */
|
||||
preferences.maximum_video_tracks =
|
||||
std::min(maximum_video_tracks.value(), static_cast<uint32_t>(MAX_OUTPUT_VIDEO_ENCODERS));
|
||||
}
|
||||
|
||||
return post_data;
|
||||
|
||||
Reference in New Issue
Block a user