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/CS/HandBrake.ApplicationServices/Services/LibScan.cs | |
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/CS/HandBrake.ApplicationServices/Services/LibScan.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/LibScan.cs | 18 |
1 files changed, 16 insertions, 2 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)
|