summaryrefslogtreecommitdiff
path: root/test/player_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-06-07 17:17:11 +0100
committerCarl Hetherington <cth@carlh.net>2018-06-07 17:17:11 +0100
commit80908df324b330dc35d7e70b69ae5fce0dcfbab1 (patch)
treefb7b171ee9f1e8f88a65cec31d76d63cf571f4ed /test/player_test.cc
parent4fcceb85cbf029d65b26d18042c7bfe4ad326b2a (diff)
Assorted fixes to queue management.
Diffstat (limited to 'test/player_test.cc')
-rw-r--r--test/player_test.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/player_test.cc b/test/player_test.cc
index 6a6864dba..52f3097cb 100644
--- a/test/player_test.cc
+++ b/test/player_test.cc
@@ -263,3 +263,22 @@ BOOST_AUTO_TEST_CASE (player_seek_test2)
check_image(String::compose("test/data/player_seek_test2_%1.png", i), String::compose("build/test/player_seek_test2_%1.png", i), 0.011);
}
}
+
+/** Test a bug when trimmed content follows other content */
+BOOST_AUTO_TEST_CASE (player_trim_test)
+{
+ shared_ptr<Film> film = new_test_film2 ("player_trim_test");
+ shared_ptr<Content> A = content_factory(film, "test/data/flat_red.png").front();
+ film->examine_and_add_content (A);
+ BOOST_REQUIRE (!wait_for_jobs ());
+ A->video->set_length (10 * 24);
+ shared_ptr<Content> B = content_factory(film, "test/data/flat_red.png").front();
+ film->examine_and_add_content (B);
+ BOOST_REQUIRE (!wait_for_jobs ());
+ B->video->set_length (10 * 24);
+ B->set_position (DCPTime::from_seconds (10));
+ B->set_trim_start (ContentTime::from_seconds (2));
+
+ film->make_dcp ();
+ BOOST_REQUIRE (!wait_for_jobs ());
+}