From 6649b8c96ebaa04cd3596387c24e9567504fd2a3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 11 Jan 2015 16:46:12 +0000 Subject: Fix call to dcp::Time constructor. --- src/lib/subrip_decoder.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/lib/subrip_decoder.cc') diff --git a/src/lib/subrip_decoder.cc b/src/lib/subrip_decoder.cc index 0ef747cf1..22f7b6ba4 100644 --- a/src/lib/subrip_decoder.cc +++ b/src/lib/subrip_decoder.cc @@ -24,6 +24,7 @@ using std::list; using std::vector; using std::string; +using std::cout; using boost::shared_ptr; using boost::optional; @@ -64,8 +65,8 @@ SubRipDecoder::pass () j->italic, dcp::Colour (255, 255, 255), j->font_size.points (72 * 11), - dcp::Time (rint (_subtitles[_next].from.metric().get().all_as_milliseconds() / 4)), - dcp::Time (rint (_subtitles[_next].to.metric().get().all_as_milliseconds() / 4)), + dcp::Time (rint (_subtitles[_next].from.metric().get().all_as_seconds())), + dcp::Time (rint (_subtitles[_next].to.metric().get().all_as_seconds())), i->vertical_position.line.get() * (1.5 / 22) + 0.8, dcp::TOP, j->text, @@ -96,7 +97,7 @@ SubRipDecoder::subtitles_during (ContentTimePeriod p, bool starting) const ContentTime::from_seconds (i->from.metric().get().all_as_seconds()), ContentTime::from_seconds (i->to.metric().get().all_as_seconds()) ); - + if ((starting && p.contains (t.from)) || (!starting && p.overlaps (t))) { d.push_back (t); } -- cgit v1.2.3