diff --git a/ScreenCaptureLib/Screencast/FFmpegOptionsForm.cs b/ScreenCaptureLib/Screencast/FFmpegOptionsForm.cs index f2e13f6fc..7e12c50f2 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; - if (!Options.FFmpeg.UseCustomCommands) - { - txtCommandLinePreview.Text = Options.GetFFmpegCommands(); - } + txtCommandLinePreview.Text = Options.FFmpeg.UseCustomCommands ? Options.FFmpeg.CustomCommands : Options.GetFFmpegCommands(); } private void txtCommandLinePreview_TextChanged(object sender, EventArgs e) { - Options.FFmpeg.CustomCommands = txtCommandLinePreview.Text; + if (cbCustomCommands.Checked) + { + Options.FFmpeg.CustomCommands = txtCommandLinePreview.Text; + } } } } \ No newline at end of file diff --git a/ScreenCaptureLib/Screencast/ScreencastOptions.cs b/ScreenCaptureLib/Screencast/ScreencastOptions.cs index cd29f5985..05199f65b 100644 --- a/ScreenCaptureLib/Screencast/ScreencastOptions.cs +++ b/ScreenCaptureLib/Screencast/ScreencastOptions.cs @@ -76,8 +76,10 @@ public string GetFFmpegCommands() return commands; } - - return GetFFmpegArgs(); + else + { + return GetFFmpegArgs(); + } } private string GetFFmpegArgs()