}
Job::~Job ()
+{
+ stop_thread ();
+}
+
+void
+Job::stop_thread ()
{
if (_thread) {
_thread->interrupt ();
}
delete _thread;
+ _thread = 0;
}
/** Start the job in a separate thread, returning immediately */
void set_message (std::string m);
int elapsed_sub_time () const;
void check_for_interruption_or_pause ();
+ void stop_thread ();
boost::shared_ptr<const Film> _film;
/*
- Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
}
+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 ();
+}
+
string
TranscodeJob::name () const
{
/*
- Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
{
public:
explicit TranscodeJob (boost::shared_ptr<const Film> film);
+ ~TranscodeJob ();
std::string name () const;
std::string json_name () const;