Hint about out-of-range markers (#1920).
authorCarl Hetherington <cth@carlh.net>
Wed, 17 Mar 2021 15:35:26 +0000 (16:35 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 17 Mar 2021 15:35:26 +0000 (16:35 +0100)
src/lib/hints.cc
src/lib/hints.h

index 32accdd02c611ea5d46a8291ff9745151114520d..96a9c88ec312a8b7127283af4c224c6edd883716 100644 (file)
@@ -333,6 +333,18 @@ subtitle_mxf_too_big (shared_ptr<dcp::SubtitleAsset> asset)
 }
 
 
+void
+Hints::check_out_of_range_markers ()
+{
+       auto const length = film()->length();
+       for (auto const& i: film()->markers()) {
+               if (i.second >= length) {
+                       hint (_("At least one marker comes after the end of the project and will be ignored."));
+               }
+       }
+}
+
+
 void
 Hints::thread ()
 {
@@ -355,6 +367,7 @@ Hints::thread ()
        check_3d_in_2d ();
        check_loudness ();
        check_ffec_and_ffmc_in_smpte_feature ();
+       check_out_of_range_markers ();
 
        emit (bind(boost::ref(Progress), _("Examining closed captions")));
 
index d070dc2014c3e707b6362bc6fc2d64af094d34b5..c13ad22a4e56761de1b6d075c57017c4b9f40502 100644 (file)
@@ -71,6 +71,7 @@ private:
        void check_3d_in_2d ();
        void check_loudness ();
        void check_ffec_and_ffmc_in_smpte_feature ();
+       void check_out_of_range_markers ();
 
        boost::thread _thread;
        /** This is used to make a partial DCP containing only the subtitles and closed captions that