Fix incorrect string find logic.
[dcpomatic.git] / src / lib / dcp_subtitle_content.cc
index d25e06188b95de79ab189e9cbc03b1a8af5adad2..63ee19830bb62bb8a16c33477f25fef9b4283113 100644 (file)
@@ -76,6 +76,8 @@ DCPSubtitleContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job)
 
        _length = ContentTime::from_seconds (sc->latest_subtitle_out().as_seconds ());
 
+       sc->fix_empty_font_ids ();
+
        BOOST_FOREACH (shared_ptr<dcp::LoadFontNode> i, sc->load_font_nodes ()) {
                only_text()->add_font (shared_ptr<Font> (new Font (i->id)));
        }
@@ -88,6 +90,12 @@ DCPSubtitleContent::full_length (shared_ptr<const Film> film) const
        return DCPTime (_length, frc);
 }
 
+DCPTime
+DCPSubtitleContent::approximate_length () const
+{
+       return DCPTime (_length, FrameRateChange());
+}
+
 string
 DCPSubtitleContent::summary () const
 {