diff options
author | sr55 <[email protected]> | 2013-09-01 15:42:24 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-09-01 15:42:24 +0000 |
commit | bcb1dcedb04fabcde6475daa2d8c9bf01c128139 (patch) | |
tree | cca78bd0d47380ba528484c8b6067926d1759e9a /win | |
parent | a1d00e78f5778119ce52ee66c2ce5314348f5e9e (diff) |
WinGui: Fix around logging when the TextWriter is closed and Removed an unneeded error handler in Interop library. (libavformat mp4 muxer does not have a large file size option)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5764 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/LibScan.cs | 18 | ||||
-rw-r--r-- | win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs | 13 |
2 files changed, 18 insertions, 13 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs index fabdcb81d..157380b8c 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs @@ -171,6 +171,21 @@ namespace HandBrake.ApplicationServices.Services /// </param>
public void Scan(string sourcePath, int title, int previewCount, Action<bool> postAction)
{
+ // Try to cleanup any previous scan instances.
+ if (instance != null)
+ {
+ try
+ {
+ this.scanLog.Close();
+ this.scanLog.Dispose();
+ instance.Dispose();
+ }
+ catch (Exception exc)
+ {
+ // Do Nothing
+ }
+ }
+
// Clear down the logging
this.logging.Clear();
@@ -292,8 +307,7 @@ namespace HandBrake.ApplicationServices.Services {
if (this.scanLog != null)
{
- this.scanLog.Close();
- this.scanLog.Dispose();
+ this.scanLog.Flush();
}
}
catch (Exception)
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs index 4a99043ef..62d2b09c4 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs @@ -119,21 +119,12 @@ namespace HandBrake.Interop {
if (!string.IsNullOrEmpty(message))
{
- string[] messageParts = message.Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries);
+ string[] messageParts = message.Split(new[] { "\n" }, StringSplitOptions.RemoveEmptyEntries);
if (messageParts.Length > 0)
{
message = messageParts[0];
-
- // When MP4 muxing fails (for example when the file is too big without Large File Size)
- // a message is logged but it isn't marked as an error.
- if (message.StartsWith("MP4ERROR", StringComparison.Ordinal))
- {
- SendErrorEvent(message);
- return;
- }
-
- SendMessageEvent(message);
+ SendMessageEvent(message);
}
}
}
|