diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-02 09:03:08 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-02 09:03:08 +0100 |
| commit | d9f6eaec8f78e6d8d5739d3aa68bd7485d8534cd (patch) | |
| tree | 4a05d15a891c2dbce7eca8e1825bfcf7b5fb71fe | |
| parent | bc10b0f1d7bcfb2302bd22e39f4400e452ffd6d5 (diff) | |
Fix subrip test.
| -rw-r--r-- | src/lib/subrip_content.cc | 3 | ||||
| -rw-r--r-- | test/subrip_test.cc | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/subrip_content.cc b/src/lib/subrip_content.cc index 9524cf96b..eb9c67d9a 100644 --- a/src/lib/subrip_content.cc +++ b/src/lib/subrip_content.cc @@ -50,7 +50,10 @@ SubRipContent::examine (boost::shared_ptr<Job> job) { Content::examine (job); SubRip s (shared_from_this ()); + shared_ptr<const Film> film = _film.lock (); + assert (film); + DCPTime len (s.length (), film->active_frame_rate_change (position ())); boost::mutex::scoped_lock lm (_mutex); diff --git a/test/subrip_test.cc b/test/subrip_test.cc index 48bb265d5..3ea68737f 100644 --- a/test/subrip_test.cc +++ b/test/subrip_test.cc @@ -125,7 +125,8 @@ BOOST_AUTO_TEST_CASE (subrip_content_test) /** Test parsing of full SubRip file content */ BOOST_AUTO_TEST_CASE (subrip_parse_test) { - shared_ptr<SubRipContent> content (new SubRipContent (shared_ptr<Film> (), "test/data/subrip.srt")); + shared_ptr<Film> film = new_test_film ("subrip_test"); + shared_ptr<SubRipContent> content (new SubRipContent (film, "test/data/subrip.srt")); content->examine (shared_ptr<Job> ()); BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds ((3 * 60) + 56.471)); |
