diff options
Diffstat (limited to 'macosx/HBCore.m')
-rw-r--r-- | macosx/HBCore.m | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/macosx/HBCore.m b/macosx/HBCore.m index 8446a6a33..dbbbb790e 100644 --- a/macosx/HBCore.m +++ b/macosx/HBCore.m @@ -246,7 +246,6 @@ static void hb_error_handler(const char *errmsg) { if (self.isCancelled) { - self.cancelled = NO; return NO; } @@ -385,15 +384,7 @@ static void hb_error_handler(const char *errmsg) [HBUtilities writeToActivityLog:"%s work done", self.name.UTF8String]; - if (self.isCancelled) - { - self.cancelled = NO; - return NO; - } - else - { - return YES; - } + return self.isCancelled || (_hb_state->param.workdone.error == 0); } - (void)cancelEncode @@ -403,7 +394,6 @@ static void hb_error_handler(const char *errmsg) [HBUtilities writeToActivityLog:"%s encode cancelled", self.name.UTF8String]; } - - (void)pause { hb_pause(_hb_handle); @@ -519,6 +509,9 @@ static void hb_error_handler(const char *errmsg) { [self handleScanCompletion]; } + + // Reset the cancelled state. + self.cancelled = NO; } /** |