Remove some FFmpeg-related warnings by using AVStream::codecpar.
[dcpomatic.git] / test / hints_test.cc
index 33486f0be25f42eb1fd52e500bae01cd6f557991..16d130f22a65c04232b3c4cda000c4cb9d83967c 100644 (file)
@@ -149,7 +149,17 @@ BOOST_AUTO_TEST_CASE (hint_subtitle_too_long)
        check (
                TextType::OPEN_SUBTITLE,
                "hint_subtitle_too_long",
-               string("At least one of your subtitle lines has more than 52 characters.  It is advisable to make each line 52 characters at most in length.")
+               string("At least one of your subtitle lines has more than 52 characters.  It is recommended to make each line 52 characters at most in length.")
+             );
+}
+
+
+BOOST_AUTO_TEST_CASE (hint_subtitle_much_too_long)
+{
+       check (
+               TextType::OPEN_SUBTITLE,
+               "hint_subtitle_much_too_long",
+               string("At least one of your subtitle lines has more than 79 characters.  You should make each line 79 characters at most in length.")
              );
 }
 
@@ -212,3 +222,18 @@ BOOST_AUTO_TEST_CASE (hint_closed_caption_xml_too_big)
                );
 }
 
+
+BOOST_AUTO_TEST_CASE (hints_destroyed_while_running)
+{
+       auto film = new_test_film2 ("hints_destroyed_while_running");
+       auto content = content_factory(TestPaths::private_data() / "boon_telly.mkv").front();
+       film->examine_and_add_content (content);
+       BOOST_REQUIRE (!wait_for_jobs());
+
+       auto hints = make_shared<Hints>(film);
+       hints->start ();
+       dcpomatic_sleep_seconds (1);
+       hints.reset ();
+       dcpomatic_sleep_seconds (1);
+}
+