diff options
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs index a86f20978..65ef02ed3 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs @@ -338,10 +338,16 @@ namespace HandBrake.ApplicationServices.Services.Encode File.Delete(logFile2);
}
- this.fileWriter = new StreamWriter(logFile) { AutoFlush = true };
- this.fileWriter.WriteLine(this.header);
- this.fileWriter.WriteLine(string.Format("CLI Query: {0}", query));
- this.fileWriter.WriteLine();
+ lock (FileWriterLock)
+ {
+ this.fileWriter = new StreamWriter(logFile) { AutoFlush = true };
+ this.fileWriter.WriteLine(this.header);
+ if (!isLibhb)
+ {
+ this.fileWriter.WriteLine(string.Format("CLI Query: {0}", query));
+ }
+ this.fileWriter.WriteLine();
+ }
}
catch (Exception)
{
|