summaryrefslogtreecommitdiff
path: root/src/lib/subrip.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-12 22:55:02 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-12 22:55:02 +0000
commitc943bc82e8d585d85ca1b4832e258436fa7615ce (patch)
tree395b66bf9560dc4e4e20ab7219c005f5078bf4cb /src/lib/subrip.cc
parent7e2cf1a4a04828b5a57d5eb6869475a819005602 (diff)
Some work on SubRip content length.
Diffstat (limited to 'src/lib/subrip.cc')
-rw-r--r--src/lib/subrip.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/subrip.cc b/src/lib/subrip.cc
index 50931e12a..1fdadf87e 100644
--- a/src/lib/subrip.cc
+++ b/src/lib/subrip.cc
@@ -213,3 +213,14 @@ SubRip::convert_content (list<string> t)
return pieces;
}
+
+Time
+SubRip::length () const
+{
+ boost::mutex::scoped_lock lm (_mutex);
+ if (_subtitles.empty ()) {
+ return 0;
+ }
+
+ return _subtitles.back().to;
+}