summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-01-20 21:23:09 +0100
committerCarl Hetherington <cth@carlh.net>2022-01-24 15:59:44 +0100
commit2105bedbfa1ceaba0658f824c8fbc21c9f37cf0e (patch)
tree30f594847b4a59d9df8702afdb12334b4a9759da /test
parent6bf4ea25986d1807fa689405ce6db191fadaa256 (diff)
Slightly hacky fix for -114 errors during 3D encodes (#2173).
It still feels like I'm missing some large and beautiful trick with gathering all the gap-filling code into one place, but such a trick still eludes me.
Diffstat (limited to 'test')
-rw-r--r--test/threed_test.cc42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/threed_test.cc b/test/threed_test.cc
index 8523b5625..4fe91ebca 100644
--- a/test/threed_test.cc
+++ b/test/threed_test.cc
@@ -213,3 +213,45 @@ BOOST_AUTO_TEST_CASE (threed_test7)
JobManager::drop ();
}
+
+
+/** Trigger a -114 error by trying to make a 3D DCP out of two files with slightly
+ * different lengths.
+ */
+BOOST_AUTO_TEST_CASE (threed_test_separate_files_slightly_different_lengths)
+{
+ shared_ptr<Film> film = new_test_film2 ("threed_test3");
+ auto L = make_shared<FFmpegContent>("test/data/test.mp4");
+ film->examine_and_add_content (L);
+ auto R = make_shared<FFmpegContent>("test/data/test.mp4");
+ film->examine_and_add_content (R);
+ BOOST_REQUIRE (!wait_for_jobs());
+
+ L->video->set_frame_type (VideoFrameType::THREE_D_LEFT);
+ R->video->set_frame_type (VideoFrameType::THREE_D_RIGHT);
+ R->set_trim_end (dcpomatic::ContentTime::from_frames(1, 24));
+
+ film->set_three_d (true);
+ make_and_verify_dcp (film);
+}
+
+
+/** Trigger a -114 error by trying to make a 3D DCP out of two files with very
+ * different lengths.
+ */
+BOOST_AUTO_TEST_CASE (threed_test_separate_files_very_different_lengths)
+{
+ shared_ptr<Film> film = new_test_film2 ("threed_test3");
+ auto L = make_shared<FFmpegContent>("test/data/test.mp4");
+ film->examine_and_add_content (L);
+ auto R = make_shared<FFmpegContent>("test/data/test.mp4");
+ film->examine_and_add_content (R);
+ BOOST_REQUIRE (!wait_for_jobs());
+
+ L->video->set_frame_type (VideoFrameType::THREE_D_LEFT);
+ R->video->set_frame_type (VideoFrameType::THREE_D_RIGHT);
+ R->set_trim_end (dcpomatic::ContentTime::from_seconds(1.5));
+
+ film->set_three_d (true);
+ make_and_verify_dcp (film);
+}