Don't announce job is finished until things have been torn down; may help with #1674.
authorCarl Hetherington <cth@carlh.net>
Tue, 19 Nov 2019 23:08:09 +0000 (00:08 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 19 Nov 2019 23:08:09 +0000 (00:08 +0100)
src/lib/transcode_job.cc

index 55b4ef9..7fe28d2 100644 (file)
@@ -88,8 +88,6 @@ TranscodeJob::run ()
 
                DCPOMATIC_ASSERT (_encoder);
                _encoder->go ();
-               set_progress (1);
-               set_state (FINISHED_OK);
 
                struct timeval finish;
                gettimeofday (&finish, 0);
@@ -113,6 +111,9 @@ TranscodeJob::run ()
 
                _encoder.reset ();
 
+               set_progress (1);
+               set_state (FINISHED_OK);
+
        } catch (...) {
                _encoder.reset ();
                throw;