summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs b/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs
index 1474df7e7..82504aa0e 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs
@@ -47,8 +47,9 @@ namespace HandBrakeWPF.Services.Encode
private HBConfiguration currentConfiguration;
private bool isPreviewInstance;
private bool isLoggingInitialised;
+ private bool isEncodeComplete;
private int encodeCounter;
-
+
public LibEncode(IUserSettingService userSettingService, ILogInstanceManager logInstanceManager, int encodeCounter, IPortService portService) : base(userSettingService)
{
this.userSettingService = userSettingService;
@@ -223,6 +224,13 @@ namespace HandBrakeWPF.Services.Encode
{
this.IsEncoding = false;
+ if (isEncodeComplete)
+ {
+ return; // Prevent phantom events bubbling up the stack.
+ }
+
+ this.isEncodeComplete = true;
+
string completeMessage = "Job Completed!";
switch (e.Error)
{