From c943bc82e8d585d85ca1b4832e258436fa7615ce Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 12 Jan 2014 22:55:02 +0000 Subject: Some work on SubRip content length. --- src/lib/subrip.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/lib/subrip.cc') 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 t) return pieces; } + +Time +SubRip::length () const +{ + boost::mutex::scoped_lock lm (_mutex); + if (_subtitles.empty ()) { + return 0; + } + + return _subtitles.back().to; +} -- cgit v1.2.3