Catch attempts to make a DCP when all content has been trimmed to zero length.
authorCarl Hetherington <cth@carlh.net>
Fri, 29 Nov 2019 16:01:51 +0000 (17:01 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 29 Nov 2019 16:03:04 +0000 (17:03 +0100)
src/lib/film.cc

index 9f909633a11b0d9fd0de97219d569a9a467dd137..ede367ded490d4125d467030a8efd5f13b55e627 100644 (file)
@@ -313,6 +313,10 @@ Film::make_dcp ()
                throw runtime_error (_("You must add some content to the DCP before creating it"));
        }
 
                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"));
        }
        if (dcp_content_type() == 0) {
                throw MissingSettingError (_("content type"));
        }