X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fsubrip.cc;h=3217a4df0803a1bd4b192e18c6846ff33f4ffaa8;hb=a5139de256c287459e04c75712614b2e7246a89a;hp=3eac98e638d22c17a1940a2355abee33a3fe1649;hpb=1b1bc528ee5ca1fee1bd33f9fb6f79cd551e3b33;p=dcpomatic.git diff --git a/src/lib/subrip.cc b/src/lib/subrip.cc index 3eac98e63..3217a4df0 100644 --- a/src/lib/subrip.cc +++ b/src/lib/subrip.cc @@ -18,6 +18,7 @@ */ #include +#include #include "subrip.h" #include "subrip_content.h" #include "subrip_subtitle.h" @@ -89,8 +90,7 @@ SubRip::SubRip (shared_ptr content) throw SubRipError (line, _("a time/position line"), content->path (0)); } - current->from = convert_time (p[0]); - current->to = convert_time (p[2]); + current->period = ContentTimePeriod (convert_time (p[0]), convert_time (p[2])); if (p.size() > 3) { current->x1 = convert_coordinate (p[3]); @@ -137,7 +137,7 @@ SubRip::convert_time (string t) vector b; boost::algorithm::split (b, a[2], boost::is_any_of (",")); r += ContentTime::from_seconds (lexical_cast (b[0])); - r += ContentTime::from_seconds (lexical_cast (b[1]) / 1000); + r += ContentTime::from_seconds (lexical_cast (b[1]) / 1000); return r; } @@ -232,5 +232,5 @@ SubRip::length () const return ContentTime (); } - return _subtitles.back().to; + return _subtitles.back().period.to; }