summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs
index cdb368c9a..a36e672ca 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs
@@ -389,6 +389,7 @@ namespace HandBrake.Interop
/// <param name="scanPreviewCount">
/// The scan Preview Count.
/// </param>
+ [HandleProcessCorruptedStateExceptions]
public void StartEncode(EncodeJob jobToStart, Title title, int scanPreviewCount)
{
this.StartEncode(jobToStart, title, false, 0, 0, 0, scanPreviewCount);
@@ -418,13 +419,14 @@ namespace HandBrake.Interop
/// <param name="scanPreviewCount">
/// Number of previews
/// </param>
+ [HandleProcessCorruptedStateExceptions]
public void StartEncode(EncodeJob job, Title title, bool preview, int previewNumber, int previewSeconds, double overallSelectedLengthSeconds, int scanPreviewCount)
{
JsonEncodeObject encodeObject = EncodeFactory.Create(job, title);
JsonSerializerSettings settings = new JsonSerializerSettings
{
- NullValueHandling = NullValueHandling.Ignore
+ NullValueHandling = NullValueHandling.Ignore,
};
string encode = JsonConvert.SerializeObject(encodeObject, Formatting.Indented, settings);
@@ -444,6 +446,7 @@ namespace HandBrake.Interop
/// <summary>
/// Pauses the current encode.
/// </summary>
+ [HandleProcessCorruptedStateExceptions]
public void PauseEncode()
{
HBFunctions.hb_pause(this.hbHandle);
@@ -452,6 +455,7 @@ namespace HandBrake.Interop
/// <summary>
/// Resumes a paused encode.
/// </summary>
+ [HandleProcessCorruptedStateExceptions]
public void ResumeEncode()
{
HBFunctions.hb_resume(this.hbHandle);
@@ -460,6 +464,7 @@ namespace HandBrake.Interop
/// <summary>
/// Stops the current encode.
/// </summary>
+ [HandleProcessCorruptedStateExceptions]
public void StopEncode()
{
HBFunctions.hb_stop(this.hbHandle);