From 8a4cf4b739713a38f74a638b5e4d2e0a767832fa Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Tue, 27 Sep 2022 19:39:28 +0200 Subject: [PATCH] UI: Fix AutoRemux not working when FFmpeg output configured When the Advanced Output configuration is set to use custom FFmpeg output, automatic remuxing is disabled. Unfortunately this check will also take place even if Simple Output is used (as the value is set in the configuration data, but is not "active"). This check ensures that the check for custom FFmpeg output is only applied when Advanced Output is enabled. --- UI/window-basic-main.cpp | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 21e606103..ab7c978dd 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -7122,17 +7122,31 @@ void OBSBasic::StreamingStop(int code, QString last_error) void OBSBasic::AutoRemux(QString input, bool no_show) { - bool autoRemux = config_get_bool(Config(), "Video", "AutoRemux"); + auto config = Config(); + + bool autoRemux = config_get_bool(config, "Video", "AutoRemux"); if (!autoRemux) return; - const char *recType = config_get_string(Config(), "AdvOut", "RecType"); + bool isSimpleMode = false; - bool ffmpegOutput = astrcmpi(recType, "FFmpeg") == 0; + const char *mode = config_get_string(config, "Output", "Mode"); + if (!mode) { + isSimpleMode = true; + } else { + isSimpleMode = strcmp(mode, "Simple") == 0; + } - if (ffmpegOutput) - return; + if (!isSimpleMode) { + const char *recType = + config_get_string(config, "AdvOut", "RecType"); + + bool ffmpegOutput = astrcmpi(recType, "FFmpeg") == 0; + + if (ffmpegOutput) + return; + } if (input.isEmpty()) return;