From c1fa7ae07f8658cd5fdfb8c867a21c3cb4b1de5b Mon Sep 17 00:00:00 2001 From: Jaex Date: Wed, 4 Jun 2014 14:55:25 +0300 Subject: [PATCH] Revert "Prevent FFmpeg Custom Commands from getting overwritten" This reverts commit 4a403fd65f0635637f5a81c37627ff946bc15e5b. --- ScreenCaptureLib/Screencast/FFmpegOptionsForm.cs | 10 +++++----- ScreenCaptureLib/Screencast/ScreencastOptions.cs | 6 ++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ScreenCaptureLib/Screencast/FFmpegOptionsForm.cs b/ScreenCaptureLib/Screencast/FFmpegOptionsForm.cs index 7e12c50f2..f2e13f6fc 100644 --- a/ScreenCaptureLib/Screencast/FFmpegOptionsForm.cs +++ b/ScreenCaptureLib/Screencast/FFmpegOptionsForm.cs @@ -338,15 +338,15 @@ private void cbCustomCommands_CheckedChanged(object sender, EventArgs e) Options.FFmpeg.UseCustomCommands = cbCustomCommands.Checked; txtCommandLinePreview.ReadOnly = !Options.FFmpeg.UseCustomCommands; - txtCommandLinePreview.Text = Options.FFmpeg.UseCustomCommands ? Options.FFmpeg.CustomCommands : Options.GetFFmpegCommands(); + if (!Options.FFmpeg.UseCustomCommands) + { + txtCommandLinePreview.Text = Options.GetFFmpegCommands(); + } } private void txtCommandLinePreview_TextChanged(object sender, EventArgs e) { - if (cbCustomCommands.Checked) - { - Options.FFmpeg.CustomCommands = txtCommandLinePreview.Text; - } + Options.FFmpeg.CustomCommands = txtCommandLinePreview.Text; } } } \ No newline at end of file diff --git a/ScreenCaptureLib/Screencast/ScreencastOptions.cs b/ScreenCaptureLib/Screencast/ScreencastOptions.cs index 05199f65b..cd29f5985 100644 --- a/ScreenCaptureLib/Screencast/ScreencastOptions.cs +++ b/ScreenCaptureLib/Screencast/ScreencastOptions.cs @@ -76,10 +76,8 @@ public string GetFFmpegCommands() return commands; } - else - { - return GetFFmpegArgs(); - } + + return GetFFmpegArgs(); } private string GetFFmpegArgs()