Merge master.
[dcpomatic.git] / src / lib / subrip.cc
index 3eac98e638d22c17a1940a2355abee33a3fe1649..9d207d528d0f04f7060ebc18c5e8d2fbe4228a16 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include <boost/algorithm/string.hpp>
+#include <boost/lexical_cast.hpp>
 #include "subrip.h"
 #include "subrip_content.h"
 #include "subrip_subtitle.h"
@@ -137,7 +138,7 @@ SubRip::convert_time (string t)
        vector<string> b;
        boost::algorithm::split (b, a[2], boost::is_any_of (","));
        r += ContentTime::from_seconds (lexical_cast<int> (b[0]));
-       r += ContentTime::from_seconds (lexical_cast<float> (b[1]) / 1000);
+       r += ContentTime::from_seconds (lexical_cast<double> (b[1]) / 1000);
 
        return r;
 }