summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-11-29 17:01:51 +0100
committerCarl Hetherington <cth@carlh.net>2019-11-29 17:03:04 +0100
commit943ad5ffe393015ed6640e094a2ced8284d2135e (patch)
tree3b0318af8c5e1d0283b8e0e4352bcf9bee4c521a /src/lib
parentff6e988f7ca07a7ab19e9f825025e8937ed95008 (diff)
Catch attempts to make a DCP when all content has been trimmed to zero length.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/film.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 9f909633a..ede367ded 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -313,6 +313,10 @@ Film::make_dcp ()
throw runtime_error (_("You must add some content to the DCP before creating it"));
}
+ if (length() == DCPTime()) {
+ throw runtime_error (_("The DCP is empty, perhaps because all the content has zero length."));
+ }
+
if (dcp_content_type() == 0) {
throw MissingSettingError (_("content type"));
}