summaryrefslogtreecommitdiffstats
path: root/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-09-26 16:10:16 +0000
committersr55 <[email protected]>2010-09-26 16:10:16 +0000
commit944fe868810ac0438ae97b1ade8c7cff2de05192 (patch)
tree886d04c858ea026d938b83c8b6fe0ba1e5af262d /win/C#/HandBrake.ApplicationServices/Services/Encode.cs
parent1bca5338bb277f7351c67c890fc8fbc6b4fdbc71 (diff)
WinGui:
- The scan log will no longer be written to disk if the log is over 100MB. An error message will be thrown. - The encode will be terminated if the log file grows beyond 100MB and an error message will be thrown. - Fixed an issue with the exception window not appearing when called from a worker thead. - Put a limit on the number of exception windows that can appear during a session of HandBrake. (set to 30) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3554 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/HandBrake.ApplicationServices/Services/Encode.cs')
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/Encode.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Encode.cs b/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
index 95cc57676..a0340c656 100644
--- a/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
+++ b/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
@@ -242,7 +242,7 @@ namespace HandBrake.ApplicationServices.Services
{
try
{
- if (this.HbProcess != null) this.HbProcess.Kill();
+ if (this.HbProcess != null && !this.HbProcess.HasExited) this.HbProcess.Kill();
}
catch (Exception exc)
{
@@ -464,6 +464,14 @@ namespace HandBrake.ApplicationServices.Services
if (fileWriter != null && fileWriter.BaseStream.CanWrite)
{
fileWriter.WriteLine(e.Data);
+
+ // If the logging grows past 100MB, kill the encode and stop.
+ if (fileWriter.BaseStream.Length > 100000000)
+ {
+ this.Stop();
+ errorService.ShowError("The encode has been stopped. The log file has grown to over 100MB which indicates a serious problem has occured with the encode.",
+ "Please check the encode log for an indication of what the problem is.");
+ }
}
}
catch (Exception exc)