OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 27 Feb 2011 16:33:55 +0000 (16:33 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 27 Feb 2011 16:33:55 +0000 (16:33 +0000)
- 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
win/C#/HandBrake.ApplicationServices/Services/QueueProcessor.cs

index 0e9465d..4a6333d 100644 (file)
@@ -376,7 +376,6 @@ namespace HandBrake.ApplicationServices.Services
                     Thread.Sleep(2500);\r
 \r
                     this.HbProcess.CancelErrorRead();\r
-                    this.HbProcess.CancelOutputRead();\r
 \r
                     if (fileWriter != null)\r
                     {\r
index ff865e2..130e1fc 100644 (file)
@@ -197,6 +197,12 @@ namespace HandBrake.ApplicationServices.Services
                 GrowlCommunicator.Notify("Encode Completed",\r
                                          "Put down that cocktail...\nyour Handbrake encode is done.");\r
 \r
+            if (!e.Successful)\r
+            {\r
+                this.Pause();\r
+                MessageBox.Show(e.Exception + e.ErrorInformation);\r
+            }\r
+\r
             // Handling Log Data \r
             this.EncodeService.ProcessLogs(this.QueueManager.LastProcessedJob.Destination);\r
 \r
@@ -209,9 +215,10 @@ namespace HandBrake.ApplicationServices.Services
         /// </summary>\r
         private void ProcessNextJob()\r
         {\r
-            if (this.EncodeService.IsEncoding)\r
+            if (this.EncodeService.IsEncoding || !this.IsProcessing)\r
             {\r
                 // We don't want to try start a second encode, so just return out. The event will trigger the next encode automatically.\r
+                // Also, we don't want to start a new encode if we are paused.\r
                 return;\r
             }\r
 \r