diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-01-12 22:55:02 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-01-12 22:55:02 +0000 |
| commit | c943bc82e8d585d85ca1b4832e258436fa7615ce (patch) | |
| tree | 395b66bf9560dc4e4e20ab7219c005f5078bf4cb /src/lib/subrip.cc | |
| parent | 7e2cf1a4a04828b5a57d5eb6869475a819005602 (diff) | |
Some work on SubRip content length.
Diffstat (limited to 'src/lib/subrip.cc')
| -rw-r--r-- | src/lib/subrip.cc | 11 |
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; +} |
