+ make_and_verify_dcp (film);
+
+ vector<boost::filesystem::path> dirs = { film->dir(film->dcp_name(false)) };
+ auto const notes = dcp::verify(dirs, boost::bind(&no_op), boost::bind(&no_op), TestPaths::xsd());
+ dump_notes (notes);
+ BOOST_REQUIRE (notes.empty());
+}
+
+
+/** Setting ReelType::BY_LENGTH and using a small length value should not make
+ * <1s reels.
+ */
+BOOST_AUTO_TEST_CASE (reels_should_not_be_short3)
+{
+ auto A = make_shared<FFmpegContent>("test/data/flat_red.png");
+ auto film = new_test_film2 ("reels_should_not_be_short3", {A});
+ film->set_video_frame_rate (24);
+ film->set_reel_type (ReelType::BY_LENGTH);
+ film->set_reel_length (1024 * 1024 * 10);
+
+ A->video->set_length (240);
+
+ make_and_verify_dcp (film);
+
+ auto const notes = dcp::verify({}, boost::bind(&no_op), boost::bind(&no_op), TestPaths::xsd());
+ dump_notes (notes);
+ BOOST_REQUIRE (notes.empty());
+}
+
+
+/** Having one piece of content less than 1s long in ReelType::BY_VIDEO_CONTENT
+ * should not make a reel less than 1s long.
+ */
+BOOST_AUTO_TEST_CASE (reels_should_not_be_short4)
+{
+ auto A = make_shared<FFmpegContent>("test/data/flat_red.png");
+ auto B = make_shared<FFmpegContent>("test/data/flat_red.png");
+ auto film = new_test_film2 ("reels_should_not_be_short4", {A, B});
+ film->set_video_frame_rate (24);
+ film->set_reel_type (ReelType::BY_VIDEO_CONTENT);
+
+ A->video->set_length (240);
+
+ B->video->set_length (23);
+ B->set_position (film, DCPTime::from_frames(240, 24));
+
+ BOOST_CHECK_EQUAL (film->reels().size(), 1U);
+ BOOST_CHECK (film->reels().front() == dcpomatic::DCPTimePeriod(dcpomatic::DCPTime(), dcpomatic::DCPTime::from_frames(263, 24)));
+
+ film->write_metadata ();
+ make_dcp (film, TranscodeJob::ChangedBehaviour::IGNORE);