X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_subtitle_content.cc;h=f8d12d4e4a4c1130c932846aca7bbb40d0f6a591;hb=6e003ef110717dd3e4ecdb009d33671f7834e024;hp=21a50c1990db485f4c20c3b71ba4349f20cd6e0d;hpb=254b3044d72de6b033d7c584f5abd2b9aa70aad5;p=dcpomatic.git diff --git a/src/lib/dcp_subtitle_content.cc b/src/lib/dcp_subtitle_content.cc index 21a50c199..f8d12d4e4 100644 --- a/src/lib/dcp_subtitle_content.cc +++ b/src/lib/dcp_subtitle_content.cc @@ -36,6 +36,7 @@ using std::list; using boost::shared_ptr; using boost::dynamic_pointer_cast; using dcp::raw_convert; +using namespace dcpomatic; DCPSubtitleContent::DCPSubtitleContent (boost::filesystem::path path) : Content (path) @@ -76,6 +77,8 @@ DCPSubtitleContent::examine (shared_ptr film, shared_ptr job) _length = ContentTime::from_seconds (sc->latest_subtitle_out().as_seconds ()); + sc->fix_empty_font_ids (); + BOOST_FOREACH (shared_ptr i, sc->load_font_nodes ()) { only_text()->add_font (shared_ptr (new Font (i->id))); } @@ -84,10 +87,16 @@ DCPSubtitleContent::examine (shared_ptr film, shared_ptr job) DCPTime DCPSubtitleContent::full_length (shared_ptr film) const { - FrameRateChange const frc (active_video_frame_rate(film), film->video_frame_rate()); + FrameRateChange const frc (film, shared_from_this()); return DCPTime (_length, frc); } +DCPTime +DCPSubtitleContent::approximate_length () const +{ + return DCPTime (_length, FrameRateChange()); +} + string DCPSubtitleContent::summary () const {