Prevent FFmpeg Custom Commands from getting overwritten

This commit is contained in:
mcored 2014-06-04 09:03:28 +08:00
parent 2b64b6c19c
commit 4a403fd65f
2 changed files with 9 additions and 7 deletions

View file

@ -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;
}
}
}
}

View file

@ -77,8 +77,10 @@ public string GetFFmpegCommands()
return commands;
}
return GetFFmpegArgs();
else
{
return GetFFmpegArgs();
}
}
private string GetFFmpegArgs()