summaryrefslogtreecommitdiff
path: root/src/lib/subrip_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-01-11 16:46:12 +0000
committerCarl Hetherington <cth@carlh.net>2015-01-11 16:46:12 +0000
commit6649b8c96ebaa04cd3596387c24e9567504fd2a3 (patch)
tree7bd4a2d48cf34a3f71beba06ab7c3f4166c6d660 /src/lib/subrip_decoder.cc
parent5ee4ac547e22fd9e4aadc35617ca43d02667ccb1 (diff)
Fix call to dcp::Time constructor.
Diffstat (limited to 'src/lib/subrip_decoder.cc')
-rw-r--r--src/lib/subrip_decoder.cc7
1 files changed, 4 insertions, 3 deletions
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);
}