From b0852001f68d86d925b6dba7a92d63cfb51f3e72 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 27 Feb 2011 16:33:55 +0000 Subject: [PATCH] WinGui: - Fix an issue that was causing queue processing to crash out. git-svn-id: svn://localhost/HandBrake/trunk@3817 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/HandBrake.ApplicationServices/Services/Encode.cs | 1 - win/C#/HandBrake.ApplicationServices/Services/QueueProcessor.cs | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/win/C#/HandBrake.ApplicationServices/Services/Encode.cs b/win/C#/HandBrake.ApplicationServices/Services/Encode.cs index 0e9465d1..4a6333da 100644 --- a/win/C#/HandBrake.ApplicationServices/Services/Encode.cs +++ b/win/C#/HandBrake.ApplicationServices/Services/Encode.cs @@ -376,7 +376,6 @@ namespace HandBrake.ApplicationServices.Services Thread.Sleep(2500); this.HbProcess.CancelErrorRead(); - this.HbProcess.CancelOutputRead(); if (fileWriter != null) { diff --git a/win/C#/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/C#/HandBrake.ApplicationServices/Services/QueueProcessor.cs index ff865e2e..130e1fc4 100644 --- a/win/C#/HandBrake.ApplicationServices/Services/QueueProcessor.cs +++ b/win/C#/HandBrake.ApplicationServices/Services/QueueProcessor.cs @@ -197,6 +197,12 @@ namespace HandBrake.ApplicationServices.Services GrowlCommunicator.Notify("Encode Completed", "Put down that cocktail...\nyour Handbrake encode is done."); + if (!e.Successful) + { + this.Pause(); + MessageBox.Show(e.Exception + e.ErrorInformation); + } + // Handling Log Data this.EncodeService.ProcessLogs(this.QueueManager.LastProcessedJob.Destination); @@ -209,9 +215,10 @@ namespace HandBrake.ApplicationServices.Services /// private void ProcessNextJob() { - if (this.EncodeService.IsEncoding) + if (this.EncodeService.IsEncoding || !this.IsProcessing) { // We don't want to try start a second encode, so just return out. The event will trigger the next encode automatically. + // Also, we don't want to start a new encode if we are paused. return; } -- 2.11.0