diff options
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);
}
}
}
|