From 2cc4c6e8d36b1e74ea0acebe8a8bb1946a198dd5 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 14 Feb 2015 18:10:39 -0800 Subject: [PATCH] UI: Prevent re-updating of the stream encoder Using advanced output mode, the stream encoder could be updated with the same settings, causing the encoder to output those changes unnecessarily. --- obs/window-basic-main-outputs.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/obs/window-basic-main-outputs.cpp b/obs/window-basic-main-outputs.cpp index 4120dd879..1511f0c57 100644 --- a/obs/window-basic-main-outputs.cpp +++ b/obs/window-basic-main-outputs.cpp @@ -609,7 +609,11 @@ void AdvancedOutput::SetupOutputs() bool AdvancedOutput::StartStreaming(obs_service_t *service) { - AdvancedOutput::Update(); + if (!useStreamEncoder || + (!ffmpegRecording && !obs_output_active(fileOutput))) { + UpdateStreamSettings(); + } + if (!Active()) SetupOutputs(); @@ -634,7 +638,14 @@ bool AdvancedOutput::StartStreaming(obs_service_t *service) bool AdvancedOutput::StartRecording() { - AdvancedOutput::Update(); + if (!useStreamEncoder) { + if (!ffmpegRecording) { + UpdateRecordingSettings(); + } + } else if (!obs_output_active(streamOutput)) { + UpdateStreamSettings(); + } + if (!Active()) SetupOutputs();