Просмотр исходного кода

UI: Do not auto-remux if using FFmpeg output

jp9000 7 лет назад
Родитель
Сommit
5fb02c02dc
1 измененных файлов с 17 добавлено и 1 удалено
  1. 17 1
      UI/window-basic-main.cpp

+ 17 - 1
UI/window-basic-main.cpp

@@ -5152,10 +5152,21 @@ void OBSBasic::StreamingStop(int code, QString last_error)
 void OBSBasic::AutoRemux()
 {
 	const char *mode = config_get_string(basicConfig, "Output", "Mode");
-	const char *path = strcmp(mode, "Advanced") != 0
+	bool advanced = astrcmpi(mode, "Advanced") == 0;
+
+	const char *path = !advanced
 		? config_get_string(basicConfig, "SimpleOutput", "FilePath")
 		: config_get_string(basicConfig, "AdvOut", "RecFilePath");
 
+	/* do not save if using FFmpeg output in advanced output mode */
+	if (advanced) {
+		const char *type = config_get_string(basicConfig, "AdvOut",
+				"RecType");
+		if (astrcmpi(type, "FFmpeg") == 0) {
+			return;
+		}
+	}
+
 	QString input;
 	input += path;
 	input += "/";
@@ -5163,6 +5174,11 @@ void OBSBasic::AutoRemux()
 
 	QFileInfo fi(remuxFilename.c_str());
 
+	/* do not remux if lossless */
+	if (fi.suffix().compare("avi", Qt::CaseInsensitive) == 0) {
+		return;
+	}
+
 	QString output;
 	output += path;
 	output += "/";