X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fsubtitle_timing_test.cc;h=79cc68849499531dfa339e63bfeacd4f16724b9a;hb=9d1d1cea1cdf17b4cc2208800ca22288f979d3ec;hp=e8d4b07fe51e01c4b54f9e02df2f38957113ecf7;hpb=9d6feb056d3dfd3c1fef59b6340e77fb23830f54;p=dcpomatic.git diff --git a/test/subtitle_timing_test.cc b/test/subtitle_timing_test.cc index e8d4b07fe..79cc68849 100644 --- a/test/subtitle_timing_test.cc +++ b/test/subtitle_timing_test.cc @@ -35,17 +35,19 @@ BOOST_AUTO_TEST_CASE (test_subtitle_timing_with_frame_rate_change) { + Cleanup cl; + using boost::filesystem::path; constexpr auto content_frame_rate = 29.976f; const std::string name = "test_subtitle_timing_with_frame_rate_change"; - auto picture = content_factory("test/data/flat_red.png").front(); - auto sub = content_factory("test/data/hour.srt").front(); - sub->text.front()->set_language(dcp::LanguageTag("en-GB")); - picture->set_video_frame_rate (content_frame_rate); + auto picture = content_factory("test/data/flat_red.png")[0]; + auto sub = content_factory("test/data/hour.srt")[0]; + sub->text.front()->set_language(dcp::LanguageTag("en")); - auto film = new_test_film2 (name, { picture, sub }); + auto film = new_test_film2(name, { picture, sub }, &cl); + picture->set_video_frame_rate(film, content_frame_rate); auto const dcp_frame_rate = film->video_frame_rate(); make_and_verify_dcp (film, {dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME, dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE_FOR_2K }); @@ -66,5 +68,7 @@ BOOST_AUTO_TEST_CASE (test_subtitle_timing_with_frame_rate_change) BOOST_CHECK (error < (1.0f / dcp_frame_rate)); ++index; } + + cl.run(); }