mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-02 21:20:28 +12:00
fixed #5816: Handle illegal output file path
This commit is contained in:
parent
b03bf28dd1
commit
c7c4b0807a
|
@ -135,9 +135,16 @@ private void UpdateOptions()
|
||||||
lblVideoQualityValue.Text = Options.VideoQuality.ToString();
|
lblVideoQualityValue.Text = Options.VideoQuality.ToString();
|
||||||
|
|
||||||
if (!Options.UseCustomArguments)
|
if (!Options.UseCustomArguments)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
txtArguments.Text = Options.GetFFmpegArgs();
|
txtArguments.Text = Options.GetFFmpegArgs();
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
txtArguments.Text = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lblVideoCodec.Visible = cbVideoCodec.Visible = !Options.UseCustomArguments;
|
lblVideoCodec.Visible = cbVideoCodec.Visible = !Options.UseCustomArguments;
|
||||||
txtArguments.Visible = Options.UseCustomArguments;
|
txtArguments.Visible = Options.UseCustomArguments;
|
||||||
|
@ -159,6 +166,8 @@ private bool StartEncoding()
|
||||||
ffmpeg.TrackEncodeProgress = true;
|
ffmpeg.TrackEncodeProgress = true;
|
||||||
ffmpeg.EncodeProgressChanged += Manager_EncodeProgressChanged;
|
ffmpeg.EncodeProgressChanged += Manager_EncodeProgressChanged;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
string outputFilePath = Options.OutputFilePath;
|
string outputFilePath = Options.OutputFilePath;
|
||||||
string args = Options.Arguments;
|
string args = Options.Arguments;
|
||||||
result = ffmpeg.Run(args);
|
result = ffmpeg.Run(args);
|
||||||
|
@ -168,6 +177,11 @@ private bool StartEncoding()
|
||||||
Helpers.OpenFolderWithFile(outputFilePath);
|
Helpers.OpenFolderWithFile(outputFilePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.ShowError();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in a new issue