Rename TYPE_DEBUG_PLAYER to TYPE_DEBUG_VIDEO_VIEW.
[dcpomatic.git] / src / lib / transcode_job.cc
index 55b4ef9b69aeadc4e9aaf87e397d9bd50aa10cd8..fb586b0825631da9e9a9efc79038103733735791 100644 (file)
@@ -54,9 +54,6 @@ TranscodeJob::TranscodeJob (shared_ptr<const Film> film)
 
 TranscodeJob::~TranscodeJob ()
 {
-       /* We have to stop the job thread here as we're about to start tearing down
-          the Encoder, which is bad news if the job thread is still feeding it data.
-       */
        stop_thread ();
 }
 
@@ -88,8 +85,6 @@ TranscodeJob::run ()
 
                DCPOMATIC_ASSERT (_encoder);
                _encoder->go ();
-               set_progress (1);
-               set_state (FINISHED_OK);
 
                struct timeval finish;
                gettimeofday (&finish, 0);
@@ -113,6 +108,9 @@ TranscodeJob::run ()
 
                _encoder.reset ();
 
+               set_progress (1);
+               set_state (FINISHED_OK);
+
        } catch (...) {
                _encoder.reset ();
                throw;