summaryrefslogtreecommitdiff
path: root/src/lib/writer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-12-20 23:37:57 +0000
committerCarl Hetherington <cth@carlh.net>2014-12-20 23:37:57 +0000
commit4dbc6ef917aeceb906b1ef1caf6911033e7e2c54 (patch)
tree203675d00d5cc004be6205218f835b6d7a10e925 /src/lib/writer.cc
parentab32f60c2c9f2ad01dc8d96dc375df256dba0c41 (diff)
Hand-apply d849d411cff28ef5453085791d0b4d7cd73bd070 from master; replace all assert()s with thrown exceptions.
Diffstat (limited to 'src/lib/writer.cc')
-rw-r--r--src/lib/writer.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 07b637d46..512973f46 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -87,7 +87,7 @@ Writer::Writer (shared_ptr<const Film> f, weak_ptr<Job> j)
boost::filesystem::remove_all (_film->dir (_film->dcp_name ()));
shared_ptr<Job> job = _job.lock ();
- assert (job);
+ DCPOMATIC_ASSERT (job);
job->sub (_("Checking existing image data"));
check_existing_picture_mxf ();
@@ -308,7 +308,7 @@ try
_last_written_eyes = qi.eyes;
shared_ptr<Job> job = _job.lock ();
- assert (job);
+ DCPOMATIC_ASSERT (job);
int64_t total = _film->length().frames (_film->video_frame_rate ());
if (_film->three_d ()) {
/* _full_written and so on are incremented for each eye, so we need to double the total
@@ -333,7 +333,7 @@ try
++i;
}
- assert (i != _queue.rend());
+ DCPOMATIC_ASSERT (i != _queue.rend());
QueueItem qi = *i;
++_pushed_to_disk;
@@ -483,7 +483,7 @@ Writer::finish ()
cpl->add (reel);
shared_ptr<Job> job = _job.lock ();
- assert (job);
+ DCPOMATIC_ASSERT (job);
job->sub (_("Computing image digest"));
_picture_mxf->hash (boost::bind (&Job::set_progress, job.get(), _1, false));
@@ -571,7 +571,7 @@ Writer::check_existing_picture_mxf ()
while (true) {
shared_ptr<Job> job = _job.lock ();
- assert (job);
+ DCPOMATIC_ASSERT (job);
if (N > 0) {
job->set_progress (float (_first_nonexistant_frame) / N);